[AccessD] Query result problem

Kaup, Chester Chester_Kaup at kindermorgan.com
Thu Oct 1 13:43:28 CDT 2009


Problem solved.
One of the source fields that was joined did not have any data before 5/1/2008.
Thanks for looking at it.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan
Sent: Wednesday, September 30, 2009 4:47 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Query result problem

I'd guess that's it's the Date resrtiction combined with the INNER JOIN.

Are there any records with ProductionMonth values less than 4/1/2008 in 
[qry Injection Data for Oil and Gas Production Allocation]

On 30 Sep 2009 at 10:56, Kaup, Chester wrote:

> When I run the following query I only get results from 4/1/2008 forward. This worked fine in Access 2003. I am now using Access 2007.
> Data from 1/1/1995 to 4/1/2008 is 0's if that makes a difference.
> No I did not write these queries - an engineer did.
...
> 
> SELECT [qry Injection Data for Oil and Gas Production Allocation].Well_In_CO2PAT, 
...
> FROM [qry Injection Data for Oil and Gas Production Allocation] 
> INNER JOIN [qry Injection Data for Oil and Gas Production Allocation] AS [qry Injection Data for Oil and Gas Production Allocation_1] 
> ON ([qry Injection Data for Oil and Gas Production Allocation].Well_in_CO2PAT_API = [qry Injection Data for Oil and Gas Production Allocation_1].Well_in_CO2PAT_API) 
> AND ([qry Injection Data for Oil and Gas Production Allocation].Other_Pattern_as_Well_API = [qry Injection Data for Oil and Gas Production Allocation_1].Other_Pattern_as_Well_API)
...
>WHERE
...
> AND (([qry Injection Data for Oil and Gas Production 
> Allocation_1].ProductionMonth)=DateAdd("m",-1, [qry Injection Data for
> Oil and Gas Production Allocation]![ProductionMonth]))) 

-- 
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