Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to Update using SQL 2 tables with 2 key fields

Status
Not open for further replies.

sheehaj

Programmer
Jan 25, 2002
1
US
Have 2 tables with more than 1 key field. Need to update 1st table using criteria from 1st table and 2nd table. Have done this previously but the tables had only 1 key field each (one to one relationship). Now have 2 key fields in first table and 3 key fields in second table (one to many relationship). Will update but most certainly not the correct accounts.
How can I add to the following?
UPDATE SHEEHAJ/SRVCOLI
SET ICLEAR = 20010124
WHERE IENTER < 20011001
AND ICLEAR = 0
AND ILOAN > 0004000000
AND ILOAN = ANY
(SELECT CLOAN FROM SHEEHAJ/SRVCOLC
WHERE CCOMM LIKE '%CC120%')
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top