Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Update with multiple tables
Hi,
I have 2 database tables. I need to update a column in one table with that in another. Somehow I need to have a join in the update statement but I can't get it to work.
Take the following SQL which works fine in SQLServer.
update table1 set table1.col1 =
table2.col1
from table2, table3
where table2.col2 = table1.col2 and table2.col3= table3.col1
and (table2.col3= 'CNI' or table2.col3 = 'CN2' or table2.col3 ='CSS')
and table3.col2= 'Y';
If anyone has any ideas, it would be appreciated. the Oracle help seems to be poor when trying to find out how to do an update with multiple tables.
Thanks
Ian Received on Tue Jun 25 2002 - 06:27:01 CDT