Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Last row
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
Miscellaneous
Thread ID:
00415642
Message ID:
00415786
Views:
24
>Bottom in SQL Server terms is a relative term. SQL Server tables are physically ordered based on the a clustered index. If you have a clustered index on a date field, then the last row will be the highest date (assuming it is in ascending order), while the maximum PK may exist in the middle somewhere.
>
>Depending on the order you want you can use the TOP keyword in your SQL statement.
>
>select top 1 * from mytable order by mykey desc
>
>This will give the maximum and it won't involve two queries. My way of thinking would be you would first have to retrieve the maximum key and then query again based on that key. This is done in one step.
>
>HTH.

Ahh, another strategy that seems workable.

Thanks,
John Harvey
Shelbynet.com

"I'm addicted to placebos. I could quit, but it wouldn't matter." Stephen Wright
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform