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)
 Transpose Values like Excel

Author  Topic 

rekiller
Starting Member

31 Posts

Posted - 2007-10-10 : 18:44:56
I have the following sentence:

SELECT
'0101','0201','0202','0204','0206','0207','0209','0210','0213','0214','0215','0216','0217'


What i want is that it return data in rows:

Colum1
'0101'
'0201'
'0202'
'0204'
'0206'
'0207'
'0209'
'0210'
'0213'
'0214'
'0215'
'0216'
'0217'

How can i do it?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-10-10 : 19:23:59
http://www.sqlteam.com/article/parsing-csv-values-into-multiple-rows

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -