I have a problem with some SQL.
I have 2 tables. Person and Customer.
Both Tables have a CUSTOMER_ ID field.
I want to select every CUSTOMER_NAME from the Customer Table whose ID is NOT in the Person Table.
So i think I should be doing a NOT-Equal Join.
This Code snippet works fine. But when the Person Table is Empty (Hence Nothing is returned from the Inner Select), Nothing gets returned for my entire select.
If at lease one record is present in Person, the SQL works fine.
What am I missing?
from CUSTOMER inner join PERSON on CUSTOMER.CUSTOMER_ID NOT IN (select CUSTOMER_ID from PERSON)
where (CUSTOMER.DATE_OF_BIRTH <= TO_DATE('28/11/2008', 'dd/MM/yyyy'))