Kaup, Chester
Chester_Kaup at kindermorgan.com
Wed May 10 07:11:51 CDT 2006
Yes if you mean the field PT_Well. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Tuesday, May 09, 2006 5:46 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Top values query problem You want to limit the number of records in each ordered group -- is this correct? Susan H. When I run the following query I get the top 6 values for only the first PT_Well which makes sense the way the query grid makes the query. How do I change the query to get the top 6 for each PT_Well? Thanks. SELECT TOP 6 PT_Well, PT_Date, PT_Status FROM dbo_Prod_Tests GROUP BY PT_Well, PT_Date, PT_Status ORDER BY PT_Well, PT_Date DESC; 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 -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.392 / Virus Database: 268.5.5/334 - Release Date: 5/8/2006 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com