Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Carriage returns and Line feed in varchar.

Author  Topic 

Vinnie881
Master Smack Fu Yak Hacker

1231 Posts

Posted - 2008-09-30 : 12:30:19


I want to include a carriage return and a line feed in a varchar, so if I copied the output to MS word it would include the new line, but for some reason it does not seem to take. Any sugestions?




select 'hello' + char(13) + char(10) + 'New Line'
Union All
select 'hello test 2' + char(13) + char(10) + 'New Line'



If I copied the cells output to word, the linefeeds do not show.

Any sugestions?


Success is 10% Intelligence, 70% Determination, and 22% Stupidity.
\_/ _/ _/\_/ _/\_/ _/ _/- 881

Vinnie881
Master Smack Fu Yak Hacker

1231 Posts

Posted - 2008-09-30 : 12:36:11
Looks like the issue is just issolated to when you copy from SSMS to ms word. It appears to work fine when I use in SSRS.


Success is 10% Intelligence, 70% Determination, and 22% Stupidity.
\_/ _/ _/\_/ _/\_/ _/ _/- 881
Go to Top of Page
   

- Advertisement -