[AccessD] Need a summary query to return more than one record for a member of a group

Mcgillivray, Donald [ITS] donald.a.Mcgillivray at mail.sprint.com
Thu Nov 18 11:11:37 CST 2004


Hi, All

I have a table of data, populated by an automated mail insertion system,
containing the following fields:

JobID 
MachineID
OperatorID
PieceID
InsertTime (Date + Time)

The system writes a record for each piece that is inserted by the
system.  Typically, there will be a single operator working a job on a
machine, but on larger jobs an operator's shift may be interrupted by
another operator (relief during breaks, technicians making adjustments,
repairs, etc.)  When these interruptions occur, the interrupter logs in
and any work processed during the interruption is logged under the
interrupter's ID.  Then when the original operator returns, s/he logs in
and subsequent work is logged under that ID.  A summary query grouped on
JobID, MachineID, and OperatorID, with count of PieceID and min and max
of InsertTime gives me a single record for each operator showing piece
count and start and end time.  However, the delta between the min and
max times does not reflect the actual elapsed time for each, since the
original operator's min and max times encompass the period when the
interrupter was logged in as well.  

I know I could loop thru the records incrementing counters and write a
record to a table when a change in operator is detected, but my
preference is to capture elapsed run time for each operator using a
single query.  Anybody know if/how I can return more than one record for
a member of a group in a summary query?

Don McGillivray
Sprint Mailing Services



More information about the AccessD mailing list