Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Want to display the table like as follows

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
narendra_12d

New User


Joined: 07 Sep 2006
Posts: 7
Location: bangalore

PostPosted: Sat Mar 03, 2007 1:24 am    Post subject: Want to display the table like as follows
Reply with quote

hi i have the table like this

TAB X

A B

1 5
2 6
3 7
4 8

this is my table, i want output like as follows...

C D

1 A
3 A
7 B
8 B


please help any body, Thanks in advance...

regards,
narendra.
Back to top
View user's profile Send private message

wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Sat Mar 03, 2007 2:25 am    Post subject:
Reply with quote

So what is the logic used in this display? I mean how does the 1 3 7 8 pattern come?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Sat Mar 03, 2007 2:47 am    Post subject: Re: query for the table
Reply with quote

narendra_12d wrote:
please help any body
Gladly, but you must help us first.
Please do us a favor and look at what you just posted as if you had never seen that table or heard of what it should become. If you can do that, I think you will realize that it makes no sense.
Try to reformat your request with a better example and a logical explanation of what you want.
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Sat Mar 03, 2007 3:47 am    Post subject:
Reply with quote

Hello,

Please use "real" (or at least descriptive) column names rather than A, B, C, & D. Are these column names in 2 tables?

Is your "result" a new table (TAB Y) or some kind of report?

What "rules" are applied the the input to get the results you want? (Why were 2, 4, 5, & 6 not applied to the "new" table?).

Your post makes perfect sense to you, but not to the rest of us. As Bill said - for us to help, you must help first.
Back to top
View user's profile Send private message
vini_srcna

Active User


Joined: 26 May 2005
Posts: 178
Location: Copenhagen, Denmark

PostPosted: Tue Mar 06, 2007 4:27 pm    Post subject:
Reply with quote

Please get back to us with more information on your logic. What exactly you need. I would suggest to use application program rather than sql for this kind of purpose.
Back to top
View user's profile Send private message
vini_srcna

Active User


Joined: 26 May 2005
Posts: 178
Location: Copenhagen, Denmark

PostPosted: Tue Mar 06, 2007 4:31 pm    Post subject:
Reply with quote

I mean to say use sql in appliction program with some programmic logic to get the desired things.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 18 Thu Jul 13, 2017 2:11 pm
No new posts Display upon console bipinpeter COBOL Programming 1 Thu Jun 22, 2017 12:35 am
No new posts unload data from table with lob columns farhad_evan DB2 1 Sat Apr 22, 2017 1:32 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us