Criteria in Select Query

D

Dustin B

I know this should be easy but for some reason I am lost on how.

I have a field that I want to pull only if value is not 0 or 47.25 "Delivery
Difference". When I put "<> 0 or 47.25" it doesn't work. It continues to
pull all of the fields with 47.25 in that field. For those who like the SQL
please see below.

SELECT qryDifferences.[Broker Ref #], qryDifferences.[Port of Export],
qryDifferences.[Container #], qryDifferences.[# of Containers],
qryDifferences.[Container Size], qryDifferences.[Base Difference],
qryDifferences.[Ebaf Difference], qryDifferences.[Alameda Difference],
qryDifferences.[Security Difference], qryDifferences.[AMS Difference],
qryDifferences.[Delivery Difference], qryDifferences.[Brokerage Difference]
FROM qryDifferences
WHERE (((qryDifferences.[Container Size])<>"LCL") AND ((qryDifferences.[Base
Difference])<>0)) OR (((qryDifferences.[Container Size])<>"LCL") AND
((qryDifferences.[Ebaf Difference])<>0)) OR (((qryDifferences.[Container
Size])<>"LCL") AND ((qryDifferences.[Alameda Difference])<>0)) OR
(((qryDifferences.[Container Size])<>"LCL") AND ((qryDifferences.[Security
Difference])<>0)) OR (((qryDifferences.[Container Size])<>"LCL") AND
((qryDifferences.[AMS Difference])<>0)) OR (((qryDifferences.[Container
Size])<>"LCL") AND ((qryDifferences.[Delivery Difference])<>0)) OR
(((qryDifferences.[Container Size])<>"LCL") AND ((qryDifferences.[Brokerage
Difference])<>0));
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top