[AccessD] First of each group

Jim DeMarco Jdemarco at hudsonhealthplan.org
Thu Dec 29 12:41:27 CST 2005


Don't know about SQL but you can do with a repoort.  Get the data into a query and base a report on it sorted by system name.  In the report but a group header on system name and set Group On property to Prefix characters.  Set character number to 3.  Add another sort by system name here if necessary.  Put all output fields in the header and hide the detail section.

Should show you the top item in each group.

HTH

Jim DeMarco

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of John Colby
Sent: Thursday, December 29, 2005 1:24 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] First of each group


I have a "system" table, with the PKID (autonumber), the name of the system,
and the system description:

PK	Sys Name	Sys Descr
1752	AHU7135	Air Handling Units
1754	AHU7137	Air Handling Units
1743	AC0037	Autoclaves (Decon)
1744	AC0038	Autoclaves (Decon)
1745	AC0039	Autoclaves (Decon)

Etc.  

I need to select the PK, Name and description for the FIRST instance of each
system of a given description, and populate a combo with the results:

1752	AHU7135	Air Handling Units
1743	AC0037	Autoclaves (Decon)

I don't know how to do this is a simple SQL statement.  Any suggestions?

John W. Colby
www.ColbyConsulting.com 

Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


***********************************************************************************
"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged.  If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited.  If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message.  Thank You".
***********************************************************************************




More information about the AccessD mailing list