Grouping information

A

Amin

So let's say I'm trying to figure out where work is sent to. I have five
fields: workload id, name, time (in numeric, not date/time), person sent to,
and the time that it took. Usually, ted wil select workload 'A' at 11 AM, and
then send it to bill after working it for five minutes.

So the record will look like:
A, ted, 110000, bill, 5

But sometimes, ted has to send it to jon, who then send it to bill.
So the records are:

B, ted, 100000, jon, 4
B, jon, 110000, bill, 0.5

What I would like to do is get rid of the second part of this transaction.
So my query would only return:

B, ted, 100000, jon, 4

This seems really easy, but I'm having a really hard time doing this. I know
the way to do this is to use the time (I want to keep the earliest time), but
I can't figure out how to put it in.

Thanks so much for any help on this one!
Amin
 
K

KARL DEWEY

Add a DateTime field with default =Now() so that when a record is cerate it
inserts the time.
 
T

tkelley via AccessMonster.com

Try this:

SELECT Min(Table1.TimeSent) AS MinOfTimeSent, Table1.WID, First(Table1.
EmplName) AS FirstOfEmplName, First(Table1.TimeSent) AS FirstOfTimeSent,
First(Table1.Recipient) AS FirstOfRecipient, First(Table1.TimeTook) AS
FirstOfTimeTook
FROM Table1
GROUP BY Table1.WID;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top