I am having trouble coming up with the SQL to update a table based on information from a different table. Each table uses a composite key and I would like to change the value of a third column on table one based on the data in a third column in Table 2.
Attachment has sample data
I need to update the MODE to 'I' when the PAT is 'AB'.
I have tried using the from clause to join the tables but DB2 doesn't support that. I also tried using a subquery to select rows from table 2 with the correct criteria but I think with the composite key I might select rows that I don't want to update.