views:

15

answers:

1

I've encountered a strange feature (that may be related to SQL Management Studio) with regard to the placement of return characters at the end of SQL Statements. Whilst the query runs just fine within the ID, the feature in question was breaking our deployment scripts.

Essentially, for some reason, certain lines were being terminated by what looked like a Carriage Return (CR) instead of a CRLF, as can be seen in the diff between two files below:

alt text

Now I know how to modify the build scripts to catch this, but I was curious as to how this was being caused. How on earth would a CR character be used in place of a CRLF character?

Thougts anyone?

+1  A: 

ANSI -> Unicode conversion? UNIX -> Windows conversion? Chances are, you edited it in another editor and saved it and it saved in a UNIX format, for example.

Denis Valeev
Cheers. Good answer.
James Wiseman