I have a problem with consistency across different versions of SQL Server. With the following code:
DECLARE @text NVARCHAR(50)
SET @text = 'This is line 1.' + CHAR(13)+CHAR(10) + 'This is line 2.'
SELECT @text
I copy and paste the results into notepad
SQL Server 2008R2 shows
This is line 1. This is line 2.
SQL Server 2014 shows
This is line 1.
This is line 2.
Any idea how I can fix this? Or why is this so? I want to achieve the latter.
Thanks in advance
source
share