ORA-01446: cannot select ROWID from view with DISTINCT, GROUP BY, etc.
524481Jul 28 2010 — edited Aug 9 2010Hi,
I have created view by joining two tables...And it is like this...
Create view Test_Data as
Select t.column1, t.column2, t.rowid from table1 t
union s.column1,s.column2, s.rowid from table2 s
with read only...
Now I executed the following stmt...
Select * from Test_Data where rowid = objid_ where I am passing the objid_ value...But it gave me the above error...can not I run this select stmt using the rowid ?
Any input is highly appreciated...
Thanks And Best Regards,
/Dinesh...
Hi All Again,
I created the view in the following way...Just to check...
CREATE VIEW my_view AS
SELECT t.col1 col1,
t.col2 col2,
t.rowid objid
FROM table1 t
WHERE rownum < 400
UNION
SELECT q.col1 col1,
q.col2 col2,
q.rowid objid
FROM table2 q
WITH read only;
Then I executed the following stmt...
Select * from my_view where rowid = objid_
Then I did not get that Oracle Error ORA-01446, Does anybody have any clue regarding this matter, i.e. how the use of rownum solve this prob...
Thanks And Best Regards,
/Dinesh...
Edited by: user521478 on Aug 9, 2010 4:46 PM