Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using max() command correctly in sql
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00692081
Message ID:
00692539
Views:
18
Thanks Chris, I will let you know if it is guaranteed to get last record after I analysis my growing dataset.

Thanks
Nick Patel


>Sorry, I thought you were looking for the first record in the group based on alphabetical order. I am getting the correct results with this query, but I am working with a small dataset, and am not sure that VFP is guaranteed to always get the last record:
>
>SELECT Table1.id, Table1.vname, Table2.Name ;
> FROM Table1 INNER JOIN Table2 ;
> ON Table1.id = Table2.id ;
> GROUP BY 1
>
>>Oops, I found a problem again. What I really need is to find the last entry made for id = 100 and 200. My answer that I am looking for is cindi and angie since they are the last entries. The min() worked for some items when I used this on productions record which contains a hundred or so Items. Any suggestions?
Previous
Reply
Map
View

Click here to load this message in the networking platform