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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

UNION not returning results

700297May 12 2009 — edited May 13 2009
Hi Guys,
Has this ever happened to anyone that two parts of the UNION query return results but as a single query they don't?
For ex,
select col1, null from Table1 where rownum < 2
UNION
select null, col2 from Table2 where rownum < 2;
In my query I get results from both the queries when run separately but when combined they give no results. I've tried UNION ALL but to same effect.

Any pointers to where should I look?

Thanks.

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 10 2009
Added on May 12 2009
20 comments
2,047 views