By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,946 Members | 1,600 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,946 IT Pros & Developers. It's quick & easy.

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

P: 13
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
Jul 30 '08 #1
Share this Question
Share on Google+
4 Replies


Delerna
Expert 100+
P: 1,134
huh ?????

Can you expand that?
Jul 30 '08 #2

ck9663
Expert 2.5K+
P: 2,878
If you're using sql 2005, you can use PIVOT and UNPIVOT.

-- CK
Jul 31 '08 #3

P: 13
dear plz send me query


thanxs
Aug 1 '08 #4

ck9663
Expert 2.5K+
P: 2,878
More info please.

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


-- CK
Aug 1 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.