Mathematically, these all achieve the same result.
The first one subselects all the records to kick out, then kicks them out of the select.
The second version accepts each record unless it matches both criteria together.
The third version accepts each records that fails to match either criteria individually.
Take your Pick:
Code:
SELECT (fields)
FROM MyTable
WHERE MyKey NOT IN
(SELECT T2.MyKey
FROM MyTable AS T2
WHERE (( Left(T2.[Lot Number],2) = "PT")
AND (T2.[Transaction Desc] = "Put-Away")));
or
Code:
SELECT (fields)
FROM MyTable
WHERE NOT
(
(Left([Lot Number],2) = "PT") AND
([Transaction Desc] = "Put-Away")
);
or
Code:
SELECT (fields)
FROM MyTable
WHERE
(
NOT( Left([Lot Number],2) = "PT")
OR NOT([Transaction Desc] = "Put-Away")
);