I have a table linking customers to previous purchases:
RecID CustID ProdID
1 20 105
2 20 300
3 31 105
4 45 105
5 45 300
6 45 312
I would like to get a list of CustID who bought Item 105, but was not, but Item 300.
In this case, CustID 31.
I cannot do this with selects and join. I'm at a dead end!
I would appreciate the help of experienced SQL people.
Thank!
Thank!
I am the original author of the question.
The second Mark Byers example with NOT IN works great! (I have not tried others after this one worked for me).
His first LEFT JOIN example did not return CustIDs ... I think I copied it correctly and used the correct table names and column names. So I don’t know why it didn’t work for me.
Thanks again to everyone who so kindly took the time to write some kind of SQL for me.
, ( , , , )