Hi,
Can we get records of single column into a single row? If it is possible, then what will be sql statement for this.
Thanks.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Pravin MorePosted Dec 2, 2011, 1:34 AM
hi Alok,
you can surely do it like below.....
declare @data varchar(max)
SELECT @data = COALESCE(@data + ', ', '') + EMPName from Empoyee
select @data
Thanks,
Pravin.
Alok PandeyPosted Dec 2, 2011, 2:02 AM