R
Ray Todd Jr
I have the following query:
SELECT taPROPERTY.PropertyID, taPROPERTY.CLT, taDEFENDANTNAMES.Zip,
taDEFENDANTNAMES.LastName, taDEFENDANTNAMES.FirstName,
taDEFENDANTNAMES.MiddleName, taDEFENDANTNAMES.Suffix,
taDEFENDANTNAMES.Address1, taDEFENDANTNAMES.Address2, taDEFENDANTNAMES.City,
taDEFENDANTNAMES.State
FROM taPROPERTY INNER JOIN (taDEFENDANTNAMES INNER JOIN taDEFENDANTS ON
taDEFENDANTNAMES.DefendantsNameID = taDEFENDANTS.DefendantsNameID) ON
taPROPERTY.PropertyID = taDEFENDANTS.PropertyID
WHERE (((taDEFENDANTNAMES.Zip)="37901"))
ORDER BY taDEFENDANTNAMES.Zip;
If I change the where clause to a NOT (i.e., I don't want that particular
zip code), I still get that zip code included in the output. What am I doing
wrong here. The datatype for the zip code is text. If I remove the NOT (as
the sql is above), I ONLY receive the zipcode that is in the criteria.
SELECT taPROPERTY.PropertyID, taPROPERTY.CLT, taDEFENDANTNAMES.Zip,
taDEFENDANTNAMES.LastName, taDEFENDANTNAMES.FirstName,
taDEFENDANTNAMES.MiddleName, taDEFENDANTNAMES.Suffix,
taDEFENDANTNAMES.Address1, taDEFENDANTNAMES.Address2, taDEFENDANTNAMES.City,
taDEFENDANTNAMES.State
FROM taPROPERTY INNER JOIN (taDEFENDANTNAMES INNER JOIN taDEFENDANTS ON
taDEFENDANTNAMES.DefendantsNameID = taDEFENDANTS.DefendantsNameID) ON
taPROPERTY.PropertyID = taDEFENDANTS.PropertyID
WHERE (((taDEFENDANTNAMES.Zip)="37901"))
ORDER BY taDEFENDANTNAMES.Zip;
If I change the where clause to a NOT (i.e., I don't want that particular
zip code), I still get that zip code included in the output. What am I doing
wrong here. The datatype for the zip code is text. If I remove the NOT (as
the sql is above), I ONLY receive the zipcode that is in the criteria.