DUAL Table in Union
246541Aug 31 2006 — edited Sep 1 2006I've got a strange problem in Oracle 9.2.0.3, in Solaris.
There are three queries that I am joining with two UNION clauses
SELECT FIELD1, FIELD2 FROM TABLE1
UNION
SELECT FIELD1, FIELD2 FROM TABLE2
UNION
SELECT 'One', 'Two' FROM DUAL;
The three queries executes fine individually and even the union of the first two queries works, but when I add the third query to the UNION the execution of the query hangs.
The strange this is that If I replace the third query as
SELECT 'One', 'Two' FROM USER_OBJECTS where ROWNUM < 2, it works fine.
I suspected a Data Dictionary corruption, so I ran the catalog and catproc and recompiled all objects.
Has anybody experienced this problem before. Is this caused due to some problem in the dual table? I am completely stuck at this point. any help would be greatly appreciated..
Thanks a lot,
Regards,
Anoop