By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,017 Members | 979 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,017 IT Pros & Developers. It's quick & easy.

Please help me save this query

P: 1
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.
Oct 26 '07 #1
Share this Question
Share on Google+
1 Reply


P: 9
With which language are you programming?
What is your plan for solving the problem?
We can help with the query, but how do you see yourself solving it?
Write down some steps and perhaps we can help fill in the blanks for you.
Perhaps what you need is 2 or even 3 successive queries, all depending on how you decide to go forward with your solution. Do you see what I mean?
Nov 2 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.