This is an SQL question which might be rather simplistic, but it's just not connecting with me.
I have two tables, a customer table and a purchase table. The customer table holds not only those who have made purchases (and can be linked to the purchase table), but also prospects with no link to the purchase table.
Selecting all customers is easy, I just select the customer id in the purchase table. However, I am unable to select prospects. How do I create a select that says, "Select everyone in the Customer table that is not linked in the Purchase table"? Is this even possible? I can write the code to do this, but having it in the SQL statement would be so much cleaner.
Cheers -
george
I have two tables, a customer table and a purchase table. The customer table holds not only those who have made purchases (and can be linked to the purchase table), but also prospects with no link to the purchase table.
Selecting all customers is easy, I just select the customer id in the purchase table. However, I am unable to select prospects. How do I create a select that says, "Select everyone in the Customer table that is not linked in the Purchase table"? Is this even possible? I can write the code to do this, but having it in the SQL statement would be so much cleaner.
Cheers -
george