[AccessD] TOP 1 kinda thing

Colby, John JColby at dispec.com
Tue Nov 2 11:24:15 CST 2004


Yep, that did it.  Thanks.

John W. Colby
The DIS Database Guy


-----Original Message-----
From: Gustav Brock [mailto:gustav at cactus.dk]
Sent: Tuesday, November 02, 2004 12:04 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] TOP 1 kinda thing


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

-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list