Rows to Column transpose
SELECT [id]
,[nam]
,[city]
FROM [aaaa]
GO
DECLARE @str VARCHAR(100)
SELECT @str = COALESCE(@str + ' ,', '') + [city]+[nam] FROM [aaaa]
SELECT category= @str
-- contributed by Sheju Gangadharan
Talks on SQL Server, database development, data management techniques,SQLBI/SSIS/SSAS/SSRS etc. Want to publish something db related ? mail to bineeshthomas@gmail.com with subject line starting as "SQLNET"
SQL NET FORUMPortal Maintained By : BINEESH THOMAS
0 Comments:
Post a Comment
Links to this post:
Create a Link
<< Home