Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Question
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00197746
Message ID:
00198400
Views:
12
select id, lastname, firstname from mytable ;
where sequenceid = max(sequenceid) ;
group by lastname

>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?
Thanks,
Dan Jurden
djurden@outlook.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform