AS/400 SQL Update for matching records

5 pts.
Tags:
AS/400 administration
AS/400 Records
AS/400 SQL
SQL/400
I have a file of five fields containing a number of records. I want to update the value of field 5 on a second record where the second record matches the first record for the first three fields, but where field 4 is the opposite (negative) value of field 4 on the first record.EG: Record 1 12345678, 23456, AA, 100.00, XXX Record 2 12345678, 23456, AA, -100.00, YYY I want field 5 on record 2 to be updated to XXX. Can anyone help?
ASKED: April 14, 2009  8:44 AM
UPDATED: April 14, 2009  3:33 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi, I don’t know if it can be done in SQL but I could write you a very simple RPG program to get the result you need. Graham

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following