Thanks Don!
I took your example and reworked it into my table and it works great. I can't say that I completely understand why it works <g>, but I've tested it and it does.
Thanks again for your help - Harold
SELECT MailingListId, ListSelectId, ;
StateCountAsOf, ;
StateCountId ;
FROM StateCount a ;
WHERE A.StateCountAsOf IN ;
(SELECT MAX(StateCountAsOf) ;
FROM StateCount b ;
WHERE b.MailingListId = a.MailingListId ;
AND b.ListSelectId = a.ListSelectId) ;
INTO CURSOR zStateCount
>Hi Harold,
>
>I have what you need... I created a table with the data as supplied by your last example and abbreviated the fields, but will apply with your fields.
>
>
>select a.*;
> from MailData a;
> where a.ml_date in;
> ( select max( b.ml_date );
> from MailData b;
> where b.ml_id = a.ml_id )
>
Harold