[AccessD] Query not working as expected.

Rocky Smolin rockysmolin at bchacc.com
Mon Feb 13 12:56:13 CST 2012


Are there only 40 records which satisfy the criteria?  

Sometime when I have a problem with summation queries I unclick the
summation and run it to see what records are actually passing my criteria
tests and are being included in the query.

HTH

Rocky Smolin
Beach Access Software
858-259-4334
www.bchacc.com
www.e-z-mrp.com
Skype: rocky.smolin
 


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester
Sent: Monday, February 13, 2012 10:49 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] Query not working as expected.

I have the following query. The table tbl Injection Profiles to Run has 142
records. The query is only returning 40 records. If I remove the criteria
all 142 records are returned. Can I not use a criteria this way? Here is the
SQL. Thanks.

SELECT [tbl Injection Profiles to Run].WellNumber, [tbl Injection Profiles
to Run].[Test Date],
Min(Switches.Switch_Date) AS MinOfSwitch_Date FROM Switches RIGHT JOIN [tbl
Injection Profiles to Run] ON Switches.Well = [tbl Injection Profiles to
Run].WellNumber GROUP BY [tbl Injection Profiles to Run].WellNumber, [tbl
Injection Profiles to Run].[Test Date] HAVING
(((Min(Switches.Switch_Date))>[tbl Injection Profiles to Run]![Test
Date]+365));

Chester Kaup
Engineering Technician
Kinder Morgan CO2 Company, LLP
Office (432) 688-3797
FAX (432) 688-3799

 
No trees were killed in the sending of this message. However a large number
of electrons were terribly inconvenienced.


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