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 2008 Forums
 Transact-SQL (2008)
 New Line Charecter

Author  Topic 

amsqlguy
Yak Posting Veteran

89 Posts

Posted - 2011-07-26 : 11:22:15
Guys,

I have a column where string stored should be split into multiple lines as select query output based on ' ' delimiter. For example

John VS Smith

to

John
VS
smith

Is there any to insert new line charecter in the select query based on a delimiter.

Any suggestions/inputs would help.

Thanks

robvolk
Most Valuable Yak

15732 Posts

Posted - 2011-07-26 : 11:26:52
SELECT REPLACE(myColumn, ' ', CHAR(13) + CHAR(10)) FROM myTable
Go to Top of Page
   

- Advertisement -