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)
 how do i create a line break?

Author  Topic 

young555
Starting Member

9 Posts

Posted - 2009-04-26 : 06:18:18
Hi,
I have written a query and in this query I have made a column which has combined some data together. For example: 1, 2, 3, 4
However, I want it so that in the field each number is displayed on a new line. i know one of the ways to do it is to use char(10) or char(10)+char(13).

i want to put the results of my query in an excel file. it does work when i save the results as a .csv file however, what i want to do is just copy and paste my results from sql server into excel. i want to do this because when saving the results as a csv file, the results are very difficult to re-arrange as they appear one after the other instead of an orderly table format.

however, when i do the cut and paste, the line break isnt applied to the fields i have added it to. do you know why this might be? and how i can overcome this

thank you
   

- Advertisement -