Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have 2 tables one a customer and the other an being orders. I need to report all customers with and without orders. I'm only getting the ones with orders, but I need to know the others without orders. Which join should I use? Thanks
Take the customer table first and then Left Join.
Load Customer_Code, Name, ...... from Customer;
left join
Load Customer_Code, Order_id...... from Orders;
In this way you will have all customers either having orders or not.
Regards
Nitin
Thom,
Yes left Join will work in this case.
Thanks,
AS
use outer join for getting the customer without order.
select * from customer a,order b where a.customername=b.cuomtomername(+)
I processed all my customers and orders then I did this with no luck.
Load *
Resident customer;
outer join (customer)
load *
Resident orders
drop table orders