SQL update from one Table to another based on a ID match IN db2

DB2 does indeed support joins in an UPDATE statement, only not the way you think — DB2 follows the SQL ANSI standard: UPDATE Sales_Import SI SET Sales_Import.AccountNumber = ( SELECT RAN.AccountNumber FROM RetrieveAccountNumber RAN WHERE SI.LeadID = RAN.LeadID ) The above assumes that LeadID uniquely identifies records in RetrieveAccountNumber, otherwise you will get an error … Read more