Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

DUAL Table in Union

246541Aug 31 2006 — edited Sep 1 2006
I'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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 29 2006
Added on Aug 31 2006
13 comments
2,365 views