<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211;  T-SQL Script to Insert Carriage Return and New Line Feed in Code</title>
	<atom:link href="http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Mon, 13 Feb 2012 15:11:24 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Kalokohan</title>
		<link>http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-241274</link>
		<dc:creator><![CDATA[Kalokohan]]></dc:creator>
		<pubDate>Fri, 20 Jan 2012 11:15:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-241274</guid>
		<description><![CDATA[Great ............
Thanks]]></description>
		<content:encoded><![CDATA[<p>Great &#8230;&#8230;&#8230;&#8230;<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ealya</title>
		<link>http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-201224</link>
		<dc:creator><![CDATA[Ealya]]></dc:creator>
		<pubDate>Mon, 21 Nov 2011 11:52:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-201224</guid>
		<description><![CDATA[Hi ,
Adding New Line Character is not working  When we do Export to Excel from SSRS]]></description>
		<content:encoded><![CDATA[<p>Hi ,<br />
Adding New Line Character is not working  When we do Export to Excel from SSRS</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bryden</title>
		<link>http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-161427</link>
		<dc:creator><![CDATA[Bryden]]></dc:creator>
		<pubDate>Wed, 24 Aug 2011 16:00:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-161427</guid>
		<description><![CDATA[how about this one
I would like to PREVENT a new line in the following type of codeing

print a message
do something
print result 

so the output is allon one line

e.g
PRINT &#039;restoring database : &#039;
RESTORE DATABAE ........
PRINT &#039;success / failure&#039;  depending on restore

output woulr then be
restoring database : success / failure

any ideas?

thanks in advance.
Bryden]]></description>
		<content:encoded><![CDATA[<p>how about this one<br />
I would like to PREVENT a new line in the following type of codeing</p>
<p>print a message<br />
do something<br />
print result </p>
<p>so the output is allon one line</p>
<p>e.g<br />
PRINT &#8216;restoring database : &#8216;<br />
RESTORE DATABAE &#8230;&#8230;..<br />
PRINT &#8216;success / failure&#8217;  depending on restore</p>
<p>output woulr then be<br />
restoring database : success / failure</p>
<p>any ideas?</p>
<p>thanks in advance.<br />
Bryden</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bc6really</title>
		<link>http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-140724</link>
		<dc:creator><![CDATA[bc6really]]></dc:creator>
		<pubDate>Mon, 13 Jun 2011 13:37:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-140724</guid>
		<description><![CDATA[Just a note, you are going to need to use char(13) + char(10) if you want a newline to come through the sp_send_dbmail. Most email clients are requiring this sequence to register a newline.]]></description>
		<content:encoded><![CDATA[<p>Just a note, you are going to need to use char(13) + char(10) if you want a newline to come through the sp_send_dbmail. Most email clients are requiring this sequence to register a newline.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: surya</title>
		<link>http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-130134</link>
		<dc:creator><![CDATA[surya]]></dc:creator>
		<pubDate>Wed, 20 Apr 2011 09:45:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-130134</guid>
		<description><![CDATA[Hi Pinal Dave,

i am importing to access db file into sqlsever 2008 .
in access db file one of the field name is amount in that column value is $(600.00) like that , 
when i am trying to import into sqlserver 2008 i get an error , 
in sqlserver i took data type is money ,in access db currency 
 
how to insert &quot;$(600.00)&quot; in sqlserver .

thanks and  regards
suryagiri]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal Dave,</p>
<p>i am importing to access db file into sqlsever 2008 .<br />
in access db file one of the field name is amount in that column value is $(600.00) like that ,<br />
when i am trying to import into sqlserver 2008 i get an error ,<br />
in sqlserver i took data type is money ,in access db currency </p>
<p>how to insert &#8220;$(600.00)&#8221; in sqlserver .</p>
<p>thanks and  regards<br />
suryagiri</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bart Madriaga</title>
		<link>http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-122491</link>
		<dc:creator><![CDATA[Bart Madriaga]]></dc:creator>
		<pubDate>Wed, 09 Mar 2011 04:13:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-122491</guid>
		<description><![CDATA[Thanks a lot to all you guys. It has helped solved my problem]]></description>
		<content:encoded><![CDATA[<p>Thanks a lot to all you guys. It has helped solved my problem</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josephine Bush</title>
		<link>http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-117920</link>
		<dc:creator><![CDATA[Josephine Bush]]></dc:creator>
		<pubDate>Thu, 10 Feb 2011 18:37:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-117920</guid>
		<description><![CDATA[Hi, I realized that I can select into variables and then print out what a need using CHAR(13) to get the line breaks I need in my .ics file.  Thanks, Josephine]]></description>
		<content:encoded><![CDATA[<p>Hi, I realized that I can select into variables and then print out what a need using CHAR(13) to get the line breaks I need in my .ics file.  Thanks, Josephine</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josephine Bush</title>
		<link>http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-117794</link>
		<dc:creator><![CDATA[Josephine Bush]]></dc:creator>
		<pubDate>Wed, 09 Feb 2011 23:56:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-117794</guid>
		<description><![CDATA[Hi, 
I am trying to generate a dynamic .ics file.  I need true line breaks in it and using CHAR(13) + CHAR(10) doesn&#039;t work.  It just puts spaces in and then the .ics file is not valid.    Any help would be greatly appreciated.  I really need a line break with no spaces - sort of like  does in html.  Thanks!]]></description>
		<content:encoded><![CDATA[<p>Hi,<br />
I am trying to generate a dynamic .ics file.  I need true line breaks in it and using CHAR(13) + CHAR(10) doesn&#8217;t work.  It just puts spaces in and then the .ics file is not valid.    Any help would be greatly appreciated.  I really need a line break with no spaces &#8211; sort of like  does in html.  Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hopper44</title>
		<link>http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-115256</link>
		<dc:creator><![CDATA[hopper44]]></dc:creator>
		<pubDate>Sun, 30 Jan 2011 18:05:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-115256</guid>
		<description><![CDATA[Does anyone have an idea how to embed a PAGE BREAK in T-SQL?

Line Breaks can be embedded with CHAR(13)+CHAR(10), but how about Page Breaks?

I have an application which may be output to several devices which have different pagesizes. Originally, I thought about sending multiple blank lines, but that is not a solution since devices can have different page sizes.

Any help will be appreciated.

Thanks.

Hopper44]]></description>
		<content:encoded><![CDATA[<p>Does anyone have an idea how to embed a PAGE BREAK in T-SQL?</p>
<p>Line Breaks can be embedded with CHAR(13)+CHAR(10), but how about Page Breaks?</p>
<p>I have an application which may be output to several devices which have different pagesizes. Originally, I thought about sending multiple blank lines, but that is not a solution since devices can have different page sizes.</p>
<p>Any help will be appreciated.</p>
<p>Thanks.</p>
<p>Hopper44</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-114967</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Fri, 28 Jan 2011 09:30:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-114967</guid>
		<description><![CDATA[where col like &#039;%&#039;+char(10)+char(13)+&#039;%&#039;]]></description>
		<content:encoded><![CDATA[<p>where col like &#8216;%&#8217;+char(10)+char(13)+&#8217;%&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fionsa Hughes</title>
		<link>http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-114635</link>
		<dc:creator><![CDATA[Fionsa Hughes]]></dc:creator>
		<pubDate>Thu, 27 Jan 2011 09:40:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-114635</guid>
		<description><![CDATA[Try something like this:

select * from [customer information] where [email_address] like &#039;%&#039; + convert(nvarchar(1),0x0D) + &#039;%&#039;]]></description>
		<content:encoded><![CDATA[<p>Try something like this:</p>
<p>select * from [customer information] where [email_address] like &#8216;%&#8217; + convert(nvarchar(1),0x0D) + &#8216;%&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jenny</title>
		<link>http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-114476</link>
		<dc:creator><![CDATA[Jenny]]></dc:creator>
		<pubDate>Wed, 26 Jan 2011 18:12:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-114476</guid>
		<description><![CDATA[Hi,

I want to know how can I find the carriage return from one of my Email_address column?  The column is varchar(255) field.
We have some records that someone added the carriage return in the e-mail address, I want to select those rows out from the table.

Thanks

Jenny]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I want to know how can I find the carriage return from one of my Email_address column?  The column is varchar(255) field.<br />
We have some records that someone added the carriage return in the e-mail address, I want to select those rows out from the table.</p>
<p>Thanks</p>
<p>Jenny</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fionsa Hughes</title>
		<link>http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-114117</link>
		<dc:creator><![CDATA[Fionsa Hughes]]></dc:creator>
		<pubDate>Tue, 25 Jan 2011 15:53:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-114117</guid>
		<description><![CDATA[Try using convert(nvarchar(1),0x0D) + convert(nvarchar(1),0x0A) instead of char(13) + char(10)]]></description>
		<content:encoded><![CDATA[<p>Try using convert(nvarchar(1),0x0D) + convert(nvarchar(1),0x0A) instead of char(13) + char(10)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-108122</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Mon, 27 Dec 2010 09:24:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-108122</guid>
		<description><![CDATA[If you have hightlighted the codes, it recognises based on the highlight. If not, based on the end of line]]></description>
		<content:encoded><![CDATA[<p>If you have hightlighted the codes, it recognises based on the highlight. If not, based on the end of line</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sri lakshmi kadi</title>
		<link>http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-108099</link>
		<dc:creator><![CDATA[sri lakshmi kadi]]></dc:creator>
		<pubDate>Mon, 27 Dec 2010 07:33:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-108099</guid>
		<description><![CDATA[I need information regarding,how the sql server recognises the end of the statements if we are executing no of statements at a TIME.]]></description>
		<content:encoded><![CDATA[<p>I need information regarding,how the sql server recognises the end of the statements if we are executing no of statements at a TIME.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MG</title>
		<link>http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-95974</link>
		<dc:creator><![CDATA[MG]]></dc:creator>
		<pubDate>Tue, 26 Oct 2010 20:28:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-95974</guid>
		<description><![CDATA[Thx, Yordan for adding the tab, just what I needed!]]></description>
		<content:encoded><![CDATA[<p>Thx, Yordan for adding the tab, just what I needed!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shefali Sinha</title>
		<link>http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-88057</link>
		<dc:creator><![CDATA[Shefali Sinha]]></dc:creator>
		<pubDate>Thu, 16 Sep 2010 19:22:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-88057</guid>
		<description><![CDATA[Hi,

I&#039;m using sql server 2005, and copying and pasting the results of the query below into notepad, and all the text is in one long line, not multiple lines, as I expect.  The query is:

DECLARE @NewLineChar AS CHAR(2)
SET @NewLineChar= CHAR(13) + CHAR(10)

DECLARE @Log varchar(max)
SET @Log = &#039;Log as of &#039; + convert(varchar(max), GetDate(), 101) + &#039;.&#039; + @NewLineChar
SET @Log = @Log + &#039;-----------------------------------------------&#039;+ @NewLineChar


Thanks,
Shefali]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I&#8217;m using sql server 2005, and copying and pasting the results of the query below into notepad, and all the text is in one long line, not multiple lines, as I expect.  The query is:</p>
<p>DECLARE @NewLineChar AS CHAR(2)<br />
SET @NewLineChar= CHAR(13) + CHAR(10)</p>
<p>DECLARE @Log varchar(max)<br />
SET @Log = &#8216;Log as of &#8216; + convert(varchar(max), GetDate(), 101) + &#8216;.&#8217; + @NewLineChar<br />
SET @Log = @Log + &#8216;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;&#8217;+ @NewLineChar</p>
<p>Thanks,<br />
Shefali</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pantelis Natsiavas</title>
		<link>http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-86759</link>
		<dc:creator><![CDATA[Pantelis Natsiavas]]></dc:creator>
		<pubDate>Mon, 06 Sep 2010 11:39:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-86759</guid>
		<description><![CDATA[I suppose their difference is a matter of legacy. In most cases, you should use the one (or their combination) recognized by the &quot;reader&quot; application.

For example, suppose you want to print in a .NET textbox a message stored in SQL Server. You should use their combination CHAR(13) + CHAR(10), as only their combination is recognized as a &#039;new line character&#039; CR&amp;LF by the .NET textbox control.

I hope I helped]]></description>
		<content:encoded><![CDATA[<p>I suppose their difference is a matter of legacy. In most cases, you should use the one (or their combination) recognized by the &#8220;reader&#8221; application.</p>
<p>For example, suppose you want to print in a .NET textbox a message stored in SQL Server. You should use their combination CHAR(13) + CHAR(10), as only their combination is recognized as a &#8216;new line character&#8217; CR&amp;LF by the .NET textbox control.</p>
<p>I hope I helped</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-75329</link>
		<dc:creator><![CDATA[John]]></dc:creator>
		<pubDate>Wed, 09 Jun 2010 14:34:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-75329</guid>
		<description><![CDATA[Thanks! This has helped.   My testing of your code and results:
SSMS 2008, T-sql
----
DECLARE @strPrint VARCHAR(100);
SET @strPrint = &#039;Example of carriage return, then a line feed&#039;;
SET @strPrint = @strPrint + CHAR(13)+CHAR(10);
SET @strPrint = @strPrint + &#039;SQLAuthority.com&#039;;
PRINT @strPrint;
GO
PRINT &#039;---------------------------------&#039;
DECLARE @strPrint VARCHAR(100);
SET @strPrint = &#039;Example of new line feed, then a carriage return&#039;;
SET @strPrint = @strPrint + CHAR(10)+CHAR(13);
SET @strPrint = @strPrint + &#039;SQLAuthority.com, resulted in double space&#039;;
PRINT @strPrint;
GO
DECLARE @WinNewLine nvarchar(2)
DECLARE @Tab nvarchar(1)
SET @WinNewLine = CONVERT(nvarchar(2),CHAR(13)+CHAR(10))/* reverse for dbl space*/
SET @Tab = CONVERT(nvarchar(1),CHAR(9))
PRINT &#039;---------------------------------&#039;
DECLARE @strPrint VARCHAR(100);
SET @strPrint = &#039;Example of WinNewLine, with a Tab&#039;;
SET @strPrint = @strPrint + @WinNewLine;
SET @strPrint = @strPrint + @Tab + &#039;SQLAuthority.com&#039;;
PRINT @strPrint;
GO

Results:
Example of carriage return, then a line feed
SQLAuthority.com
---------------------------------
Example of new line feed, then a carriage return

SQLAuthority.com, resulted in double space
---------------------------------
Example of WinNewLine, with a Tab
	SQLAuthority.com]]></description>
		<content:encoded><![CDATA[<p>Thanks! This has helped.   My testing of your code and results:<br />
SSMS 2008, T-sql<br />
&#8212;-<br />
DECLARE @strPrint VARCHAR(100);<br />
SET @strPrint = &#8216;Example of carriage return, then a line feed&#8217;;<br />
SET @strPrint = @strPrint + CHAR(13)+CHAR(10);<br />
SET @strPrint = @strPrint + &#8216;SQLAuthority.com&#8217;;<br />
PRINT @strPrint;<br />
GO<br />
PRINT &#8216;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8217;<br />
DECLARE @strPrint VARCHAR(100);<br />
SET @strPrint = &#8216;Example of new line feed, then a carriage return&#8217;;<br />
SET @strPrint = @strPrint + CHAR(10)+CHAR(13);<br />
SET @strPrint = @strPrint + &#8216;SQLAuthority.com, resulted in double space&#8217;;<br />
PRINT @strPrint;<br />
GO<br />
DECLARE @WinNewLine nvarchar(2)<br />
DECLARE @Tab nvarchar(1)<br />
SET @WinNewLine = CONVERT(nvarchar(2),CHAR(13)+CHAR(10))/* reverse for dbl space*/<br />
SET @Tab = CONVERT(nvarchar(1),CHAR(9))<br />
PRINT &#8216;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8217;<br />
DECLARE @strPrint VARCHAR(100);<br />
SET @strPrint = &#8216;Example of WinNewLine, with a Tab&#8217;;<br />
SET @strPrint = @strPrint + @WinNewLine;<br />
SET @strPrint = @strPrint + @Tab + &#8216;SQLAuthority.com&#8217;;<br />
PRINT @strPrint;<br />
GO</p>
<p>Results:<br />
Example of carriage return, then a line feed<br />
SQLAuthority.com<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Example of new line feed, then a carriage return</p>
<p>SQLAuthority.com, resulted in double space<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Example of WinNewLine, with a Tab<br />
	SQLAuthority.com</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jose</title>
		<link>http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-71034</link>
		<dc:creator><![CDATA[Jose]]></dc:creator>
		<pubDate>Sun, 16 May 2010 00:37:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-71034</guid>
		<description><![CDATA[Thanks!
...But, do you know how to clean the messages.
I want to clean : (1 row(s) affected) because my message with print command appears after those messagges(row affected).]]></description>
		<content:encoded><![CDATA[<p>Thanks!<br />
&#8230;But, do you know how to clean the messages.<br />
I want to clean : (1 row(s) affected) because my message with print command appears after those messagges(row affected).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JAMES</title>
		<link>http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-70600</link>
		<dc:creator><![CDATA[JAMES]]></dc:creator>
		<pubDate>Wed, 12 May 2010 15:37:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-70600</guid>
		<description><![CDATA[GREAT JOB.............]]></description>
		<content:encoded><![CDATA[<p>GREAT JOB&#8230;&#8230;&#8230;&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yogesh</title>
		<link>http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-65723</link>
		<dc:creator><![CDATA[Yogesh]]></dc:creator>
		<pubDate>Tue, 20 Apr 2010 13:59:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-65723</guid>
		<description><![CDATA[it is not working with SQL Server Compact : 3.5.5386.0
Pls Help]]></description>
		<content:encoded><![CDATA[<p>it is not working with SQL Server Compact : 3.5.5386.0<br />
Pls Help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Balavenkatesh</title>
		<link>http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-64173</link>
		<dc:creator><![CDATA[Balavenkatesh]]></dc:creator>
		<pubDate>Thu, 01 Apr 2010 00:05:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-64173</guid>
		<description><![CDATA[Hi,

  Some of the users in SQL Server 2005 face this error frequently.  Login failed for user &#039;&#039;. The user is not associated with a trusted SQL Server connection. (Microsoft SQL Server, Error: 18452)

  Please suggest what is the solution for this.

REgards,
S.Balavenkatesh]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>  Some of the users in SQL Server 2005 face this error frequently.  Login failed for user &#8221;. The user is not associated with a trusted SQL Server connection. (Microsoft SQL Server, Error: 18452)</p>
<p>  Please suggest what is the solution for this.</p>
<p>REgards,<br />
S.Balavenkatesh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yordan Georgiev</title>
		<link>http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-64104</link>
		<dc:creator><![CDATA[Yordan Georgiev]]></dc:creator>
		<pubDate>Wed, 31 Mar 2010 08:39:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-64104</guid>
		<description><![CDATA[-- use this variable while generating code 
DECLARE @WinNewLine nvarchar(2)
set @WinNewLine = CONVERT ( nvarchar(2) , CHAR(13) + CHAR(10))

-- this is a horizontal tab
DECLARE @Tab nvarchar(1)
set @Tab = CONVERT(NVARCHAR(1) , CHAR(9))]]></description>
		<content:encoded><![CDATA[<p>&#8211; use this variable while generating code<br />
DECLARE @WinNewLine nvarchar(2)<br />
set @WinNewLine = CONVERT ( nvarchar(2) , CHAR(13) + CHAR(10))</p>
<p>&#8211; this is a horizontal tab<br />
DECLARE @Tab nvarchar(1)<br />
set @Tab = CONVERT(NVARCHAR(1) , CHAR(9))</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-62722</link>
		<dc:creator><![CDATA[Madhivanan]]></dc:creator>
		<pubDate>Thu, 11 Mar 2010 09:55:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/#comment-62722</guid>
		<description><![CDATA[It is not advisable to use this method to enter data
Use query analyser and INSERT statement]]></description>
		<content:encoded><![CDATA[<p>It is not advisable to use this method to enter data<br />
Use query analyser and INSERT statement</p>
]]></content:encoded>
	</item>
</channel>
</rss>

