Re: Asked and answered... ORA-1445
From: Saibabu Devabhaktuni <saibabu_d_at_yahoo.com>
Date: Fri, 7 Dec 2012 00:52:35 -0800 (PST)
Message-ID: <1354870355.51498.YahooMailNeo_at_web161306.mail.bf1.yahoo.com>
John,
The reason why you got ORA-1445 is because you didn't use alias for rowid and Oracle parser interpreted it as you trying to fetch pseudo rowid from the inline view and hence it bis subjected to key preserved table requirement.
Date: Fri, 7 Dec 2012 00:52:35 -0800 (PST)
Message-ID: <1354870355.51498.YahooMailNeo_at_web161306.mail.bf1.yahoo.com>
John,
The reason why you got ORA-1445 is because you didn't use alias for rowid and Oracle parser interpreted it as you trying to fetch pseudo rowid from the inline view and hence it bis subjected to key preserved table requirement.
In the below query, change "select x.rowid from x_test_a x, x_test_b b" to "select x.rowid rid from x_test_a x, x_test_b b", and "where x.rowid = a.rowid" to "where x.rowid = a.rid", then it should work just fine.
create table x_test as
with a as (select x.rowid from x_test_a x, x_test_b b where x.bar =
b.bar)
select foo from a, x_test_a x where x.rowid = a.rowid;
Thanks,
Sai
http://sai-oracle.blogspot.com
-- http://www.freelists.org/webpage/oracle-lReceived on Fri Dec 07 2012 - 09:52:35 CET