Need help in writing inline query or subquery
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