Click here to Skip to main content
Click here to Skip to main content

Select a column in a comma separated row in SQL

By , 9 May 2011
Rate this:
Please Sign up or sign in to vote.
declare @list varchar(max)
select @list=COALESCE(@list+', ','')+ COLUMN_1 from TABLE_1
select @list

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

eceramanan

India India
No Biography provided

Comments and Discussions

 
GeneralHi, fix the typos in the Tip/Trick title Replace <b>coloumn<... Pinmvpthatraja6-May-11 7:38 
GeneralRe: Thanks. Pinmembereceramanan9-May-11 22:54 
GeneralNice one PinmemberToniyo Jackson6-May-11 2:43 
Nice work. Thumbs Up | :thumbsup: Have my 5 Smile | :)
A person might be able to play without being creative, but he sure can't be creative without playing.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web02 | 2.8.140415.2 | Last Updated 10 May 2011
Article Copyright 2011 by eceramanan
Everything else Copyright © CodeProject, 1999-2014
Terms of Use
Layout: fixed | fluid