Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: strange update

Re: strange update

From: Jaap W. van Dijk <j.w.vandijk.removethis_at_hetnet.nl>
Date: Mon, 31 Mar 2003 23:52:41 +0200
Message-ID: <nvdh8vokv03v077ut1fn428oo3vtld5v61@4ax.com>


On Mon, 31 Mar 2003 16:03:29 +0200, "Marcin Buchwald" <velvet_at_agora.pl> 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
>

This looks like a NULL value related issue: my guess would be that there are records for which xx is NULL. Those do not satisfy the WHERE clause of the UPDATE.

Jaap. Received on Mon Mar 31 2003 - 15:52:41 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US