Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> SQL Update question
I am trying to update a column in a table, and I am using a subquery since
the criteria involves a join.
TableA
key
name
value1
TableB
key
tableakey
value2
Here is my SQL statement:
update tablea set value1 = 'XXX' where tablea.key in
(select tableb.tableakey from tablea, tableb where
tablea.key = tableb.tableakey and
value2 = 'ZZZ'
My update of tableA depends on a value in a column in tableB. There will be multiple records in tableB that meet the criteria.
Am I on the right track? It's not working (SQL error - ORA-00936 missing expression).
Thanks for any help,
Rich Dolan Received on Thu Dec 10 1998 - 11:16:50 CST