Red Gate forums :: View topic - SQL 2012 warning: "inconsistent line endings"
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Compare 10
SQL Compare 10 forum

SQL 2012 warning: "inconsistent line endings"

Search in SQL Compare 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message
cmorris73



Joined: 22 Nov 2013
Posts: 2

PostPosted: Fri Nov 22, 2013 6:57 pm    Post subject: SQL 2012 warning: "inconsistent line endings" Reply with quote

I am using SQL Compare 10 to generate a DB Diff script to send out to clients for a database upgrade. In SQL 2012 I am receiving a warning when opening this Diff script saying "Inconsistent Line Endings". I know you can click Yes to continue opening the file, but I am getting questions about a fix from our QA department so clients will not receive this message.
Back to top
View user's profile Send private message
eddie davis



Joined: 14 Jun 2006
Posts: 938
Location: Red Gate Software

PostPosted: Mon Nov 25, 2013 5:10 pm    Post subject: Reply with quote

Thank you for your forum post and sorry that you have encountered a problem.

A support ticket has been created for you, the call reference is 8545 and can be viewed through the support portal HERE.

Can you please send an e-mail to support@red-gate.com with your call reference in the subject field or update the call directly via the support portal (You will need to create a Red gate ID if you do not already have one) and update the call. Please attach a copy or an example T-SQL script that is encountering this problem for me to analyse.

Many Thanks
Eddie
_________________
Eddie Davis
Technical Support Engineer
Red Gate Software Ltd
E-mail: support@red-gate.com
Back to top
View user's profile Send private message Send e-mail
cmorris73



Joined: 22 Nov 2013
Posts: 2

PostPosted: Fri Dec 06, 2013 1:13 am    Post subject: Reply with quote

Just in case others run into this error, I was able to find my issue and put a fix in. During the build process I was using to build a SQL Compare Diff script I was dynamically building a Version number inside a stored procedure. The dynamic SQL I was using to build this procedure did NOT have CR LF values for each line.

The fix was to add the following code at the end of each line in the dynamic SQL:
"+ char(13) + char(10) + "
or is you would like to see it in the dynamic SQL:
"
DECLARE @sql varchar
set @sql ='CREATE PROCEDURE sp_SetVersion' + char(13) + char(10) +
'As' + char(13) + char(10) +
'Begin' + char(13) + char(10) +
'SET NOCOUNT ON' + char(13) + char(10) +
' declare @version varchar(10), @build varchar(10), @date datetime' + char(13) + char(10) +
' set @version = ''' + @vVer + '''' + char(13) + char(10) +
' set @build = ''' + @vbuild + '''' + char(13) + char(10) +
' select @date = getdate()' + char(13) + char(10) +
' delete from [version]' + char(13) + char(10) +
' INSERT INTO [version](dbversion,[MinProductVersionsXml],[LastUpgradedDateTime])' + char(13) + char(10) +
'select @version + ''B'' + @build,CAST(''<MinProductVersions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">' + char(13) + char(10) +
'<application application_name = "AppName1" requesting_application_identity="1">'' + @version + ''</application>' + char(13) + char(10) +
'</MinProductVersions>'' AS XML)' + char(13) + char(10) +
',GETDATE()' + char(13) + char(10) +
'END'

exec(@sql1)

"

The odd thing was this error was never reported in SQL versions prior to 2012
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group