Subject RE: [firebird-support] Re: Select last - How to select latest data
Author Alan McDonald
> Sorry about the empty reply, my son keep pressing the mouse...
> I used method 1 as you have told, double ((__)) and ASC. the error i
> got is 'Access Violation at address 00404BBA...'
> The reason i need the latest 30 days data is because the stock
> information is not upto date (eg is not up today's date). some stock
> data are 5 days old, 10 days and some 30 days old.
> I use Delphi 7.
> Need help, dont know about database.

I think the methods which use COUNT(*) will become slow eventually (depends
on the size of this table).
I think your first method is the best. Get them fast from the server in the
reverse order, then sort them client side in reverse order. seems trivial to
me and will be much faster with huge tables.