|
I get warning messages when I open SQL files (.sql) in SQL Server Management Studio(SSMS). Says : The line endings of the following file are not consistent. Do you want to normalize the line endings? Any Idea why this happening? Screenshot attached... [1]: /storage/temp/406-lineending.png
(comments are locked)
|
|
I've never had this message myself but it would suggest to me that whereas some line endings are denoted by the classic windows CR LF sequence, other lines are denoted by just the LF or maybe just CR. (any good hexdump utility will show you!). Nowadays, most text editors or text export utilities allow you to choose between the windows and Unix line-ending convention (LF), and most will accept either. Could this problem happen if you post sections of code into SSMS from another source? Whichever it is, I'd say yes and let SSMS tidy it up for you. Thanks @Phill Factor, The script file is created by using SSMS only. when I open the script file in SSMS it asks me to save, the warning message hides once this is saved.
Sep 17 '12 at 11:27 AM
Cyborg
I remember, the same warning messages popup when i open SQL script files generated by Powershell.
Sep 17 '12 at 11:29 AM
Cyborg
Sounds like a UTF/ANSI issue.
Sep 17 '12 at 12:31 PM
Blackhawk-17
(comments are locked)
|
|
Is anything in the script auto-generated from data within a database? If so, it might be that there are some inconsistencies there that need to be addressed. The script file basically has the attach database statement generated using dynamic SQL Query.
Sep 17 '12 at 12:34 PM
Cyborg
So, probably not the problem then!
Sep 17 '12 at 02:22 PM
ThomasRushton ♦
(comments are locked)
|


I still have this problem when I open .sql files in SSMS, the sql files has scripts that are generated from powershell or by dynamic SQL. Anyone experienced this?