Q:"invalid ROWID" vs. "no data found"?

Q:"invalid ROWID" vs. "no data found"?

Post by Charlie Ka » Thu, 01 Feb 1996 04:00:00



Here's something that I'm trying to find a justification for at the behest of
a younger and less experienced colleague: Why, when one selects from a table
via pseudocolumn ROWID, and the ROWID is not in the specified table, does
Oracle give you "1410-invalid ROWID" rather than "1403-no data found"?

I've tried this not only with ROWIDs that I've made up (see below), but also
with valid ROWIDs that exist in other tables (so, clearly it _is_ a valid
rowid, just not for the table in question).  Any takers on this one?

-----

PL/SQL Release 2.1.3.2.1 - Production

SQL> select rowid from dual;

ROWID
------------------
00000324.0000.0001

SQL> select * from dual where rowid = '00000324.0000.0001';

D
-
X

SQL> select rowid from dual where rowid = '00000324.0000.0002';
ERROR:
ORA-01410: invalid ROWID

no rows selected

 
 
 

Q:"invalid ROWID" vs. "no data found"?

Post by Roger Harri » Fri, 02 Feb 1996 04:00:00



>Here's something that I'm trying to find a justification for at the behest of
>a younger and less experienced colleague: Why, when one selects from a table
>via pseudocolumn ROWID, and the ROWID is not in the specified table, does
>Oracle give you "1410-invalid ROWID" rather than "1403-no data found"?

>I've tried this not only with ROWIDs that I've made up (see below), but also
>with valid ROWIDs that exist in other tables (so, clearly it _is_ a valid
>rowid, just not for the table in question).  Any takers on this one?

>PL/SQL Release 2.1.3.2.1 - Production

>SQL> select rowid from dual;

>ROWID
>------------------
>00000324.0000.0001

>SQL> select * from dual where rowid = '00000324.0000.0001';

>D
>-
>X

>SQL> select rowid from dual where rowid = '00000324.0000.0002';
>ERROR:
>ORA-01410: invalid ROWID

>no rows selected

I noticed that the "invalid ROWID" message occurs if the block and file portions
of the rowid (the first and last pieces of the rowid) are not part of the table,
or are past the table's high water mark.  The "invalid ROWID" message does not
occur if the block and file portions are valid for that table, but the offset
(the middle piece) points to a row that does not exist.  In your second select
statement, you are referencing a file number (0002) that perhaps doesn't exist
in your system.

The format of rowid is:

block.offset_in_block.file

--
Roger Harris
DBA
Kraft Foods
White Plains, NY

 
 
 

1. : Connect strings - "T:"/"2:"/"X:" ?

despite browsing on-line and hardcopy manuals, I haven't found
an overview of SQL*Net connect strings/protocol specifiers,
like for example

  T: TCP/IP
  2: OS/2, Windows/NT, Windows 3.x
  X: SPX/IPX

can anybody point me to relevant docs (FAQ, Oracle on-line or hardcopy
manuals)?

Thanks,

Malgorzata Roos, University of Zurich

2. Comeau C++: Which Rexx works?

3. ORA-00904: "DOMAINELEMENT"."EXTENTION": invalid identifier

4. Shift and a key stroke to put WWW. in address box

5. Strange question on error message " PLS-00103 : Encountered the symbol "?" "" ( Urgent)

6. BIND9 giving format errors

7. "Named Users" vs. "Concurrent Users" Lic.

8. Emacs crashes when using Stig-paren

9. "Stored Procedures"- versus "SQL*Forms-only"

10. Help - "Production" and "Test" databases

11. Oracle7 "fieldtypes", "random selection" and more

12. Stored procedures and "select" requires "into"...why?