August 11, 2012 at 6:54 pm
I can't figure this out, Please help...
SQL Problem --
We have a table of orders.
CREATE TABLE Orders (ordernumber INT, rownumber INT, Description VARCHAR(10))
The rownumber is guaranteed to always between 1 and 5 and is always filled in consecutively.
Write SQL that will return the rownumbers as column headers, with the description as the column values. Output similar to below:
Order#Row1 Row2 Row3 Row4Row5
10 Desc1Desc2
20 Desc1Desc2desc3
Please help... Thanks!
August 12, 2012 at 7:38 pm
OK, I see, use pivot tab, thanks for the link and your help.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy