[AccessD] TOP 1 kinda thing

Gustav Brock gustav at cactus.dk
Tue Nov 2 11:03:56 CST 2004


Hi John

How about a Group By CLID selecting MIN(ATPID)?

/gustav


> I have a situation where a claim can have more than one ATP

> CLID    ATPID
> 1       1
> 1       2
> 1       3
> 2       4
> 2       5
> 3       6
> 3       7
> 3       8

> I need to select only the first ATPID such that the result set looks like:

> CLID    ATPID
> 1       1
> 2       4
> 3       6

> Is it possible to do this directly in SQL?

> John W. Colby
> The DIS Database Guy




More information about the AccessD mailing list