I have a database with the following fields:

Group: numeric
Sequence: numeric
Location: text

The database is sorted on Group & Sequence, and has a variable number of
records for each group.  I need to create a query that returns the first two
and last two records for each group.  There will (I think) always be at
least three records for each group, and so in those cases where there are
only three records the second and second to last records will be the same.

So if the original data is:
Group   Sequence        Text
1       3               point23
1       7               point56
1       8               point87
1       10              point101
7       2               locale5
7       4               point5
7       5               area10
7       13              point45
7       21              locale6
7       25              area71
7       26              area84
13      1               camp6
13      4               camp8
13      7               camp13

I need to end up with:
1       3               point23         (first)
1       7               point56         (second)
1       8               point87         (second to last)
1       10             point101       (last)
7       2               locale5          (first)
7       4               point5           (second)
7       25              area71          (second to last)
7       26              area84          (last)
13      1               camp6          (first)
13      4               camp8          (second)
13      4               camp8          (second to last)
13      7               camp13        (last)

Thanks for any help!!

Jerry Hull
[EMAIL PROTECTED]





[Non-text portions of this message have been removed]



SPONSORED LINKS
Microsoft access database Database development software Database management software
Database software Inventory database software Membership database software


YAHOO! GROUPS LINKS




Reply via email to