Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query problem

Status
Not open for further replies.

Reggie2004

Technical User
Oct 4, 2004
45
US
FROM final
WHERE ((((final.[ DOB ])>1929) or ((final.[ DOD ]) Is Not Null) or ((final.[TC-150])<>"TC-150") or ((final.[TC-290])<>"TC-290") or ((final.[TC-291])<>"TC-291") or ((final.[TC-300])<>"TC-300") or ((final.[TC-301])<>"TC-301") or ((final.[TC-420])<>"TC-420" or (final.[TC-420])<>"TC-420") or ((final.[TC-421])<>"TC-421" or (final.[TC-421])<>"TC-421") or ((final.[TC-424])<>"TC-424" or (final.[TC-424])<>"TC-424") or ((final.[TC-530])<>"TC-530") or ((final.[TC-540])<>"TC-540") or ((final.[TC-590])<>"TC-590") or ((final.[TC-591])<>"TC-591") or ((final.[TC-594])<>"TC-594") or ((final.[TC-599])<>"TC-599") or ((final.[TC-976])<>"TC-976") or ((final.[TC-977])<>"TC-977")) OR (((final.[ DOB ])<1987)));
This is the code that I am using. I don't want any of these to be included in my query. But for some reason they are being included. Can anyone tell me why or help me solve this problem. I have already tried using [and ]instead of [or ] to no avail.

Reg
 
Think about the NOT logic involved.

Do you want.
(final.[TC-150])<>"TC-150")
or (final.[TC-290])<>"TC-290")

OR.
(final.[TC-150])<>"TC-150")
and (final.[TC-290])<>"TC-290")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top