Connecting Tech Pros Worldwide Forums | Help | Site Map

need a query (columns to rows and rows to columns)

Newbie
 
Join Date: Feb 2008
Posts: 13
#1: Jul 30 '08
columns f1 f2 f2 f4 f5 f6 f7 f8 ......
1
2
3
4
.
.
i have a table in which multiple columns and records more than 1000 ,
i need a query to convert these records in columns and columns in rows.

rashid

Delerna's Avatar
Expert
 
Join Date: Jan 2008
Location: Sydney
Posts: 790
#2: Jul 31 '08

re: need a query (columns to rows and rows to columns)


huh ?????

Can you expand that?
ck9663's Avatar
Expert
 
Join Date: Jun 2007
Posts: 1,925
#3: Jul 31 '08

re: need a query (columns to rows and rows to columns)


If you're using sql 2005, you can use PIVOT and UNPIVOT.

-- CK
Newbie
 
Join Date: Feb 2008
Posts: 13
#4: Aug 1 '08

re: need a query (columns to rows and rows to columns)


dear plz send me query


thanxs
ck9663's Avatar
Expert
 
Join Date: Jun 2007
Posts: 1,925
#5: Aug 1 '08

re: need a query (columns to rows and rows to columns)


More info please.

How does your table look like and what's your desired output?


-- CK
Reply