[AccessD] Query not returning desired results

Gustav Brock gustav at cactus.dk
Mon Dec 9 12:17:28 CST 2019


Hi Chester

>  one field equals a certain value

but you have that field to exclude two certain values.

/gustav

________________________________
Fra: AccessD <accessd-bounces at databaseadvisors.com> på vegne af Kaup, Chester <Chester_Kaup at kindermorgan.com>
Sendt: 9. december 2019 18:15
Til: 'Access Developers discussion and problem solving' <accessd at databaseadvisors.com>
Emne: [AccessD] Query not returning desired results

I have a query in which I want to exclude records when one field equals a certain value and another field in the same record is null. So far it have been unsuccessful after several attempts of moving around parenthesis. Here is my statement. I defer to and appreciate the assistance of other members

WHERE ((([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 28-5A"
And ([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 56-6A")
AND (([tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API) Is Null)
AND ((Allocations.Date)=#11/1/1948#))

Also tried this

WHERE (([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A"
AND [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A"
AND [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API Is Null)
AND Allocations.Date=#11/1/1948#)

--


More information about the AccessD mailing list