[AccessD] Query not returning desired results

Gustav Brock gustav at cactus.dk
Tue Dec 10 08:56:29 CST 2019


Hi Chester

You have: 
    <>"PAT 28-5A" and: 
    <>"PAT 56-6A"

That excludes certain values, it doesn't include.

/gustav

-----Oprindelig meddelelse-----
Fra: AccessD <accessd-bounces at databaseadvisors.com> På vegne af Kaup, Chester
Sendt: 10. december 2019 15:19
Til: 'Access Developers discussion and problem solving' <accessd at databaseadvisors.com>
Emne: Re: [AccessD] Query not returning desired results

I am not following what you are saying. Please elaborate.

-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock via AccessD
Sent: Monday, December 09, 2019 12:17 PM
To: Access Developers discussion and problem solving
Cc: Gustav Brock
Subject: Re: [AccessD] Query not returning desired results

[This email message was received from the Internet and came from outside of Kinder Morgan]


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