General information
Category:
Coding, syntax & commands
If latest means highest numeric sequence field (named Numseqfld), try this:
select Lastname,max(Numseqfld) as Latest from Table1 group by 1 into cursor Cursor1
select Table1.Id,Table1.Lastname,Table1.FirstName from Table1;
Join Cursor1 on Cursor1.Lastname = Table1.Lastname ;
where Table1.numseqfld = Cursor1.Latest
Good Luck
>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?
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only