Kaup, Chester
Chester_Kaup at kindermorgan.com
Mon Apr 23 13:26:52 CDT 2007
Problem solved! Field name in source table of Date is the problem. I should know that Date is not a good field name to use. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester Sent: Monday, April 23, 2007 1:06 PM To: Access Developers discussion and problem solving Subject: [AccessD] Query returns only some results When I run the following query it returns results for only some patterns. An example is Pattern 111-1. Below the query is a listing of some of the data for Pattern 111-1. I have also tried min in place of first. I cannot seem to see why I am getting no results for this pattern. SELECT DISTINCT Daily_Appended_Audit.Pattern, First(Daily_Appended_Audit.Date) AS FirstOfDate FROM Daily_Appended_Audit WHERE (((Daily_Appended_Audit.[Inject Fluid])="Water") AND ((Daily_Appended_Audit.BWIPD)>0)) GROUP BY Daily_Appended_Audit.Pattern HAVING (((First(Daily_Appended_Audit.Date))>Date()-2)); qry First Date of Water Injection after Today Pattern Date 111-1 4/20/2006 111-1 4/21/2006 111-1 4/22/2006 111-1 4/23/2006 111-1 4/24/2006 111-1 4/25/2006 111-1 4/26/2006 111-1 4/27/2006 111-1 4/28/2006 111-1 4/29/2006 111-1 4/30/2006 111-1 5/1/2006 111-1 5/2/2006 111-1 5/3/2006 111-1 5/4/2006 111-1 5/5/2006 111-1 5/6/2006 111-1 5/7/2006 111-1 5/8/2006 111-1 5/9/2006 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