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

how to convert 2 rows into one column

P: 13
i wannn convert the following.
thx in advance.

data table

desc nvarchar(100),
amount numeric(18,2)

FROM

desc amount

commercial 5000
commercial 8000

TO

desc amount1 amount2
commercial 5000 8000
Feb 4 '10 #1

✓ answered by kabilahan

hi
check this to know about PIVOT

Share this Question
Share on Google+
4 Replies


ck9663
Expert 2.5K+
P: 2,878
Check PIVOT/UNPIVOT in SQL Server.

Happy Coding!!!

~~ CK
Feb 4 '10 #2

P: 13
Ok !!! will try !!! thx alot
Feb 5 '10 #3

P: 14
hi
check this to know about PIVOT
Feb 10 '10 #4

P: 13
Thx , It helps me alot .
Feb 15 '10 #5

Post your reply

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