Stephen Bowley
Valued Member
Points: 50
More actions
November 8, 2005 at 10:56 am
#169473
and one know how to transpose is SQL easily?
table looks like this
{Name}
john
joe
fred
william
------------------
need result set to look like this...
john,joe,fred,william
Yelena Varshal
SSC-Dedicated
Points: 34286
November 8, 2005 at 11:21 am
#602856
SQL 2005 has PIVOT and UNPIVOT statements
In SQL 2000 use Case or IF
Regards,Yelena Varsha
sushila
Points: 35293
#602855
DECLARE @NameList VARCHAR(255) SELECT @NameList = COALESCE(@NameList + ',', '') + Name FROM tblName PRINT @NameList
**ASCII stupid question, get a stupid ANSI !!!**
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply