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!

Need help in writing inline query or subquery

user13424229Sep 27 2012 — edited Sep 27 2012
Hi All,

I have 4 select statements like below ,

1>Select customer_number, customer_name,customer_address1

FROM ABC
WHERE Site_use_code='BILL_TO'
...

2>Select customer_number, customer_name,customer_address1

FROM ABC
WHERE Site_use_code='SHIP_TO'
...

3>Select customer_number, customer_name,customer_address1

FROM ABC
WHERE Site_use_code='SOLD_TO'
...

I need to write all these 3 in single select statement in such a way that if any select statement doesnot return any data it should execute the other select statements means it should not fail.

for each column of the select statment i can write separate select statements in that way it should work but the query should be very big.

So please help me on thsi.

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 25 2012
Added on Sep 27 2012
4 comments
629 views