Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: update based on query results question
G Quesnel wrote on [5 Jul 2005 09:39:17 -0700]:
> What exactly is the problem ?
> The update statement could look something like ...
> update tablez
> set col1= 'anyvalue'
> where col2 in (select a.col5 from tablea a, tableb b where
> a.col8=b.col9);
Oops.
The statement is actually
update <tablez> set <columnb> = 'value' where <columna> in (select distinct
a.column from tablea a, tableb b where a.column=b.column);
The problem is that only 40 rows in tablez are being updated when the select statement is returning over 200 unique results that match columna
> BTW - if you do a search in the newsgroup for "update select" you will
> find plenty of examples on complex update statements.
Did so before I posted and was looking to see if maybe my syntax was incorrect or something. Received on Tue Jul 05 2005 - 11:51:59 CDT
![]() |
![]() |