I have two tables: table1 with columns (ID, A1, A2) and table2 with columns (ID, newA1, newA2). I need to update values in table 1 with new values from table 2 only where IDs match. My query doesn't work even for one column:
update table1b
set b.A1= (select a.newA1 from table 2 a
where a.ID=b.ID)
Inner query returns multiple records, and the whole thing doesn't work.
Any suggestions? Thanks.
update table1b
set b.A1= (select a.newA1 from table 2 a
where a.ID=b.ID)
Inner query returns multiple records, and the whole thing doesn't work.
Any suggestions? Thanks.
Comment