Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Strange ROWID problem
On 13-Jul-98 23:08:05 Steve Haynes wrote:
>If I follow this, you have multiple copies of the
>same rowid - not to mention multiple same primary keys.
>Must be corruption.
Well I do not really have duplicate primary keys. There are simply columns that should be unique. There is no constraint on it. The rowid is not duplicate either, because when I say
select * from mytable a,mytable b
where a.rowid=b.rowid
and a.rowid<b.rowid;
I get 20 rows, thats exactly the number of rows in the table. If I select the rowids from trhe table they are all different. It seems that the '<' comparison does not work in some cases.
>Select rowid, count(*)
>from mytable
>group by rowid
>having count(*) > 1;
>This should always produce no rows. Ditto for PK.
As the '<>' comparison works this should give the right answer in my case too. I didn't check that though...
>This might be a long shot but if you suspect the
>"<" operator with rowid, try ROWIDTOCHAR or similar.
>Does it behave the same?
Good hint, I will try this!
>Check if you have anlayze table validate structure in v7...
>Perhaps the easiest fix is to open a pl/sql cursor to
>fetch by rowid then delete any found after the first
>occurance of each, but this is too weird. It shouldn't happen.
That's right, it shouldn't happen! Oracle Support is on it and I hope getting some results soon.
Sincerely,
Lothar
--
Lothar Armbrüster | lothar.armbruester_at_rheingau.netsurf.de Schulstr. 12 | lothar.armbruester_at_t-online.de D-65375 Oestrich-Winkel |Received on Tue Jul 14 1998 - 14:12:30 CDT
![]() |
![]() |