Skip to content
Advertisement

Unselect all records of same customer if a condition met

I have two data tables:

Table KHACHHANG:

Table HOADON:

I want to list all customers that did not place order in June 2000. This is my code:

But the result was:

The record of Customer ID KH04 should not appear in the result because he bought something on 22/06/2000.
So how can I remove the KH04 from the result ?
Thank you.

Advertisement

Answer

You can do it with not exists:

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement