pull first record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i have several records per person for example
Name paid date
joe smith $50.00 1/20/2003
joe smith $20.00 2/20/2003
john ramada $40.00 1/20/2003
john ramada $50.00 2/20/2003

i want to pull the first record only is there a way to do this?
 
Create a query that selects those columns, then right click and select
properties. For Top Values enter 1.

HTH;

Amy
 
dlb1228 said:
i have several records per person for example
Name paid date
joe smith $50.00 1/20/2003
joe smith $20.00 2/20/2003
john ramada $40.00 1/20/2003
john ramada $50.00 2/20/2003

i want to pull the first record only is there a way to do this?


There is no such thing as a first record. You can retrieve
the record(s?) with the earliest date, which is probably
what you meant.

Here's a query that does that sort of thing:

SELECT [name], paid, [date]
FROM thetable
WHERE [date] = (SELECT Min(X.[date]
FROM thetable As X
WHERE X.[name] = thetable.[name])

I hope your fields are not really named name and date
because those are reserved words in Access.
 
Back
Top