Selecting rowid from the View.
HarishSep 27 2005 — edited Sep 27 2005Hi,
I created view selecting rowid from two different tables:
create table A
(
A NUMBER
);
create table B
(
B NUMBER
)
CREATE OR REPLACE VIEW C AS
SELECT rowid objid, a FROM a
UNION
SELECT rowid objid, b FROM b
;
Now insert record to table A:
INSERT INTO A VALUES (1);
Now Select this record:
SELECT rowid, A.a FROM A;
Result is:
ROWID A
------------------ ----------
AAAT0oAAGAAA9bgAAA 1
Following query works fine:
select * from a
where rowid = 'AAAT0oAAGAAA9bgAAA';
But selecting it from VIEW is NOT working.
select * from C
where objid = 'AAAT0oAAGAAA9bgAAA';
The error 'ORA-01410: invalid ROWID' is raised.
But selecting it with LIKE (without %) is also working.
select * from C
where objid LIKE 'AAAThgAAGAAA9SEAAA'
What is the reason for this behaviour in rowid. I 'm using Oracle 10.1.0.4.0.
Regards,
/Harish