IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to convert rows columns in db2 sql


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sandhyaimmadi

New User


Joined: 18 Aug 2008
Posts: 50
Location: Bangalore

PostPosted: Thu Aug 28, 2008 3:52 pm
Reply with quote

Hi,

I need the query which is used to convert rows into columns.
I have tried with ROW_NUMBER() OVER(PARTITION BY USERID ORDER BY USERID) R function,but it is not working.
Could you please let me know if any other alternative is there.

Thanks in advance.
Sandhya
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Aug 29, 2008 12:30 am
Reply with quote

Hello Sandhya and welcome to the forums,

Please post example data of some rows in a table and the data you want for output from these rows. This does not need to be a large volume, but should be enough to show what you want to do.

When posting data, it is best to use the "Code" tag near the top of the reply panel as it makes your post much more readable. You can also "Preview" your post and see how it will appear to the forum and then click "Submit" when you are satisfied with how your post appears.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Remote Unload of CLOB Columns DB2 6
No new posts Increase the number of columns in the... IBM Tools 3
No new posts Exclude rows with > than x occurre... DFSORT/ICETOOL 6
Search our Forums:

Back to Top