October 14, 2008 at 3:40 am
Hi,
I have a table like col1,col2,col3....suppose the values are product, brand, color
i want to return the values in the table as a single list instead a row.
like
product
brand
color
i use sql server 2005.
how to do it? if we can use pivot i don't have any values to sum up. i just need it in a list
regards
viji
October 14, 2008 at 5:13 am
i have a similar question posted here: http://www.sqlservercentral.com/Forums/Topic585344-145-1.aspx
i am strugling with the exact same question which is what i have paraphrased how to use table data as column names.
if you find an answer please be sure to contact me. thanks
October 15, 2008 at 7:41 am
Hi,
check the following link for changing rows into cols
http://www.tsqltutorials.com/pivot.php
regards
viji
October 17, 2008 at 12:27 am
Use pivot statement. Its been a boon. Try this
http://www.simple-talk.com/sql/t-sql-programming/creating-cross-tab-queries-and-pivot-tables-in-sql/
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply