I need to cross reference 2 tables.
inside tb1 is booking_ref, investor
inside tb2 - booking_ref, investor, value
The problem is that at no cost the record is not created in table 2
So I have the following request ...
SELECT tb1.booking_ref, tb1.investor, tb2.cost FROM tb1, tb2 WHERE tb1.booking_ref = tb2.booking_ref AND tb1.investor = tb2.investor AND tb1.investor = ''12345''
this displays all orders that have suitable booking_ref in tb2, but I also need to display orders where there is no suitable booking_ref
any ideas
source share