July 24, 2008 at 1:02 am
:hehe:HI
I want to convert rows to column, through SQL and I do not want to use any functions. I am using DB2 8.2 V
My query is:
ID NAME BRANCH AMOUNT
________________________________________
1 JOHN NY 10000
1 JOHN NY 20000
1 JOHN NY 10000
2 PETER CA 50000
2 PETER CA 40000
Result should display like this:
ID NAME BRANCH AMOUNT
1 JOHN NY 10000,20000,10000
2 PETER CA 50000,40000
Hoping for early response
Cheers
chandru
October 30, 2008 at 8:49 am
...are you asking a DB2 question in the Oracle section of a SQL Server forum?
_____________________________________
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at Amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.Viewing 2 posts - 1 through 2 (of 2 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