I need help with my select statement. I'm essentially trying to get the record that does not match the others.
in table cart,
cookieId | prodId
1 | 123
1 | 314
in table relatedProds
relprodId | crossSellId
123 | 347
123 | 288
123 | 314
314 | 250
So, this person has products 123 and 314 in their cart. Product 123 relates to products 347, 288, and 314.
Based on the product in the cart, I want to select any related products to display in an ad.
However, if the person already has product 314 in their cart, do not display product 314 in the ad routine.
So, in this case the right answer would be 347, 288, 250.
I've tried various combinations, but haven't hit the right one. Any thoughts?