Has to be an easier way

  • Thread starter Thread starter Ed Finley
  • Start date Start date
E

Ed Finley

I am trying to output the most recent date a pilot flew. I have a table of
flights for the company with, among other info, flight date, pilot, and
co-pilot. How would I set up a totals query with Max(date), and grouped by
pilot wether the pilot name was in the pilot field or co-pilot field. In
other words, it doesn't matter what seat they were in, I need a list of all
the names and most recent date.
Thanks,
Ed
 
Dear Ed:

You could wrte a query that is a UNION of pilot/flight date and
co-pilot/flight date:

SELECT pilot, [flight date] FROM Your Table
UNION ALL
SELECT [co-pilot], [flight date] FROM YourTable

Save this query and perform the totals query on those results.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 
Thanks,
I knew I should have read that chapter on UNION queries. I guess I'll get
it out.
Ed


Tom Ellison said:
Dear Ed:

You could wrte a query that is a UNION of pilot/flight date and
co-pilot/flight date:

SELECT pilot, [flight date] FROM Your Table
UNION ALL
SELECT [co-pilot], [flight date] FROM YourTable

Save this query and perform the totals query on those results.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts


I am trying to output the most recent date a pilot flew. I have a table of
flights for the company with, among other info, flight date, pilot, and
co-pilot. How would I set up a totals query with Max(date), and grouped by
pilot wether the pilot name was in the pilot field or co-pilot field. In
other words, it doesn't matter what seat they were in, I need a list of all
the names and most recent date.
Thanks,
Ed
 
Back
Top