If the table has a single column Primary Key, then you can try this:SELECT * FROM productWHERE PrimaryKeyField NOT IN ( SELECT p1.PrimaryKeyField FROM product p1 INNER JOIN product p2 ON p1.Product_number = p2.Product_number WHERE p1.type = 'new' AND p1.status = 'A' AND p1.location = 'AC' AND p2.type <> 'new' AND p2.Status = 'A' AND p2.location ='LA' )
The inner select selects the primary key for the records you want to exclude. Then outer query selects all records not in that list. If there's no single column Primary Key, then try this:SELECT p1.* FROM product p1LEFT JOIN ( SELECT p1.Product_number, p1.type, p1.status, p1.location FROM product p1 INNER JOIN product p2 ON p1.Product_number = p2.Product_number WHERE p1.type = 'new' AND p1.status = 'A' AND p1.location = 'AC' AND p2.type <> 'new' AND p2.Status = 'A' AND p2.location ='LA' ) p2 ON p1.Product_number = p2.Product_number AND p1.type = p2.type AND p1.status = p2.status AND p1.location = p2.locationWHERE p2.Product_number IS NULL
This is why I like to have a single field primary key in tables like these.There are 10 types of people in the world, those that understand binary, and those that don't.