July 23, 2008 at 9:00 am
Hi,
i want to show the column data in row wise, can any one please help me how to write a query for this?
assume data in table like below:
Name Month Amount
------ ------ -------
ABC Jun-08 100
XYZ Feb-08 150
AAA Mar-08 200
ABC Feb-08 200
XYZ Mar-08 100
The output would be lie this:
Name Jun-08 Feb-08 Mar-08
----- ------- ------- -------
ABC 100 200 -
XYZ - 150 100
AAA - 200 -
Please help me the query for the above.
Thank you.
July 23, 2008 at 9:02 am
Duplicate thread. Please respond here http://www.sqlservercentral.com/Forums/Topic539362-145-1.aspx
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
July 23, 2008 at 9:03 am
Cross post. Original here: http://www.sqlservercentral.com/Forums/Topic539362-145-1.aspx
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply