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)
 multiple rows from one row.

Author  Topic 

09999
Starting Member

5 Posts

Posted - 2011-07-06 : 15:32:15
I have a column that contains data with deliminator. How do I write a query that give me multiple records.
For example:
city
abc,def
ghi,jkl
mno,pqrs

I need a query that can give me output as
city
abc
def
ghi
jkl
mno
pqrs

robvolk
Most Valuable Yak

15732 Posts

Posted - 2011-07-06 : 15:42:00
One method here: http://www.sqlteam.com/article/parsing-csv-values-into-multiple-rows
Go to Top of Page
   

- Advertisement -