[AccessD] Query not returning any records

Kaup, Chester Chester_Kaup at kindermorgan.com
Mon Sep 26 14:01:08 CDT 2011


When I run the following query I get the results listed below

SELECT dbo_WellTests.Well_API_14, dbo_WellTests.Well_Name, dbo_WellTests.TestDate
FROM dbo_WellTests
GROUP BY dbo_WellTests.Well_API_14, dbo_WellTests.Well_Name, dbo_WellTests.TestDate
HAVING (((dbo_WellTests.Well_Name)="109-2"));

Well_API_14    Well_Name TestDate
42415034120000 109-2     6/7/2011
42415034120000 109-2     6/8/2011
42415034120000 109-2     8/7/2011
42415034120000 109-2     8/28/2011
42415034120000 109-2     9/1/2011
42415034120000 109-2     9/5/2011

However when I run the following query I get no records returned. The table dbo_Welltests is an SQL Server table if that matters.

SELECT dbo_WellTests.Well_API_14, dbo_WellTests.Well_Name, Max(dbo_WellTests.TestDate) AS MaxOfTestDate
FROM dbo_WellTests
GROUP BY dbo_WellTests.Well_API_14, dbo_WellTests.Well_Name
HAVING (((dbo_WellTests.Well_Name)="109-2") AND ((Max(dbo_WellTests.TestDate))<#9/1/2011#));

Thanks.


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.





More information about the AccessD mailing list