What are the challenges you face when working across database platforms? Take the survey

carriage return line feed problem?

EnrightMcCEnrightMcC Posts: 14 Bronze 2
edited February 3, 2010 10:26AM in SQL Prompt Previous Versions
I experienced this problem with both Refactor and SQL Prompt 4. After I formatted (or laid out) the SQL in a stored proc, it wouldn't compile. I received the error "Incorrect syntax near the keyword 'FROM'."

I couldn't figure out the differences until I loaded the 'good' code and the 'bad' code into a hex editor. The end of all my lines in the 'good' code have the ASCII carriage return line feed characters in it... (0D 0A), whereas in the 'bad' code some of the lines contain the carriage return (0D), but not the line feed (0A).

My theory as to why it made my code fail with the above error is because the line in question contained a comment at the end
sql code here --followed by a  comment
more sql code here
I believe the compiler interpreted the 2nd line as being part of the same comment, therefore causing the error.

Visually they look the same in my query editor. When I added the line feed character and tried again, it worked just fine.

Is this a know bug?
Has anyone else experienced this type of problem?
Is it going to get fixed?


  • Options
    Just to confirm we are waiting for your script. I wrote in a PM:

    "Please can you send your SQL query across so that we can try to reproduce the error and, if found to be a bug, log it in our tracking system."

    Are you able to revisit this yet?
Sign In or Register to comment.