>Dan,
>
>Thanks for the help. The syntax you provided
>worked, but I'v come up with a twist on it:
>
>The table has multiple records for each person.
>I want to pull only the LATEST record of any given
>last name. I have a numeric sequence field that I
>use for ordering.
>
>Will the the syntax you provided still work?
>
>Again, I need Id, Lastname, FirstName but only
>the lastest for each person.
>
>Your thoughts?
Try something like:
select id, lastname, firstname ;
FROM mytable a;
WHERE id IN ;
(SELECT TOP 1 id ;
FROM mytable b;
WHERE b.lastname = a.lastname ;
GROUP BY LName ;
ORDER BY OrderField DESC)
Erik Moore
Clientelligence