First Occurrance In a Sequence

C

CaribbeanBlue

I have a list sorted by P/N & Seq where the Date closed is null (see belos).
What I've been trying to get out is only the 1st occurrance or the lowest seq
number and not all sequences. So in my report, I would want only P/N 123456
Seq 1 and 654321 Seq 5. HELP!

P/N Seq Dept Date Closed
123456 1 xxx
123456 2 syz
654321 5 siw
654321 6 ttt
 
S

Steve Schapel

Caribbean,

First make and save a query based on the existing data to isolate the
first Seq for each P/N, for example...
SELECT [P/N], Min([Seq]) FROM YourQuery
GROUP BY [P/N]

Then, make another query, including the existing query and the new
query, joined on both the P/N and Seq fields.
 
Top