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 -> invalid rowid when pl/sql cursor has subquery with group function

invalid rowid when pl/sql cursor has subquery with group function

From: <ssharma_at_clearnet.com>
Date: 1998/04/01
Message-ID: <6funm2$193$1@nnrp1.dejanews.com>#1/1

Hello.
Here's the simplest query to duplicate my problem

declare
cursor a is select hell from
  (select hell, count(*) cnt from hell_below group by hell)    where cnt > 1;
hell_rec number;
begin
open a;
fetch a into hell_rec;
end;

This is the simplest way I have found to fetch all the duplicate hell 's. Here's the result

SADM s> @tst_rowid_plsql
declare
*
ERROR at line 1:

ORA-01410: invalid ROWID
ORA-06512: at line 2
ORA-06512: at line 7


Elapsed: 00:00:00.13
SADM s>

Any way around this? any easier way to find duplicates (please don't suggest self - joins, I tried and that takes far   too long. This runs much, much faster in sql - plus)

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Wed Apr 01 1998 - 00:00:00 CST

Original text of this message

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