Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: strange update
Marcin Buchwald wrote:
> select id from (select mak_xx,adno,czas_obow,min(xx) id,count(1) from
> spacer_pub where adno is not null group by mak_xx,adno,czas_obow having
> count(1)>1);
>
> ...
>
> 1413 rows selected
>
> All the rows are different!
>
> Next I wrote:
>
> update spacer_pub set adno=null where xx in (select id from (select
> mak_xx,adno,czas_obow,min(xx) id,count(1) from spacer_pub where adno is not
> null group by mak_xx,adno,czas_obow having count(1)>1));
>
> 72 rows updated
>
> (!!!) I expected 1413 rows to be updated
>
> What about the other rows??
>
> I am using ora817eent
>
> Thanks in advance,
>
> Marcin
I'm not sure why you would expect it. The WHERE clauses are different.
What is the equivalent in your first statement of: "where xx in"?
Daniel Morgan Received on Mon Mar 31 2003 - 10:38:19 CST