[AccessD] Subquery

Kaup, Chester Chester_Kaup at kindermorgan.com
Tue Jan 3 12:33:47 CST 2012


I am trying to do a subquery to retrieve some data but am thinking it may not be possible. Here is the query that runs correctly. The problem is that there is a sample date for each meter_id but of course the subquery returns only the max date not a max date for each meter_id. I am thinking 2 separate queries.

SELECT [qry Produced Gas CO2 Analysis].Sample Date, [qry Produced Gas CO2 Analysis].Meter_ID, [qry Produced Gas CO2 Analysis].[Co2 Cut]
FROM [qry Produced Gas CO2 Analysis]
WHERE [qry Produced Gas CO2 Analysis].Sample_Date=(Select Max(Sample_Date)  from [qry Produced Gas CO2 Analysis]);

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