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
 

 

How to do this selective update?

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

New User


Joined: 01 Nov 2006
Posts: 56

PostPosted: Sat Oct 27, 2007 12:04 am    Post subject: How to do this selective update?
Reply with quote

Key1 Key2 Month Indication Description
A1 B1 2 N Aaaaaaaaaaa
A1 B1 3 J Bbbbbbbb
A1 B1 4 N Cccccccccccc
A1 B1 5 J Dddddddddd
A2 B2 2 J Eeeeeeeeeeee
A2 B2 3 J fffffffffffffff

I have this table.
For each key I have to search the record with the lowest month and indication J. From there on I have to change records. That means for key A1-B1 that I have to change the records for month 3, 4 and 5. Changing has to start with 3, then 4 and then 5.
For key A2-B2 I have to change both records, because the lowest month 2 has indication J

How do I programme this?? Correlated subquery? How then?? Please heldp.
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 Oct 27, 2007 12:45 am    Post subject:
Reply with quote

Hello revdpoel and welcome to the forums,

If you use a meaningful subject, you will get more and better responses.

Your subject will not attract so many viewers. "Please help me solve this" provides no hint of the actual question.

I'll change the subject and you can post a reply if you prefer a different subject - you know your requirement better than i do icon_smile.gif
Back to top
View user's profile Send private message
revdpoel

New User


Joined: 01 Nov 2006
Posts: 56

PostPosted: Sat Oct 27, 2007 12:52 am    Post subject:
Reply with quote

Thanks Dick
title is allright
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 Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm


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