[AccessD] Query not returning desired results

Paul Hartland paul.hartland at googlemail.com
Tue Dec 10 08:44:40 CST 2019


What is the full query, maybe there is something slightly wrong in the from
sql as your referencing two tables in the where, may make a little more
sense to see the full query.

Paul



On Tue, 10 Dec 2019, 14:21 Kaup, Chester, <Chester_Kaup at kindermorgan.com>
wrote:

> Got rid of all the unneeded parentheses but still got the same incorrect
> result. Thanks for the help.
>
> -----Original Message-----
> From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
> Stuart McLachlan
> Sent: Monday, December 09, 2019 2:54 PM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Query not returning desired results
>
> [This email message was received from the Internet and came from outside
> of Kinder Morgan]
>
>
> hey are all AND conditions, so for a start, just get rid of all
> parentheses.
>
>
> On 9 Dec 2019 at 17:15, Kaup, Chester wrote:
>
> > 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#)
> >
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


More information about the AccessD mailing list