Subject function TOP n FROM... was (Porting from...)
Author hannes hernler
-----Ursprüngliche Nachricht-----
Von: Nando Dessena <nandod@...>
>>in web apps I need a function like TOP very often.
>> and that is a question that I wanted to ask for long time:
>> how would you implement this now?
>> SELECT * FROM PRODUCTS and fetch only first 10 rows?
>if your aim is to fetch only a certain amount of rows at a time, having
>the chance to request the remaining rows as appropriate, then I believe
>the subject of this thread is not what you are searching for. Tools
>exist that let you do this programmatically in a very efficient way (I
>could think of Delphi's ClientDataSet and IBO in the first place).
>Actually, I can hardly see a use for "select top n" clauses, but if
>people use it and the engine already supports it...


typical web app, webinterface to a guestbook.
I want to show 20 entries of 150 and a butto next 20 and previous 20
it´s not shure that any of the buttons is clicked but it is shure
that selection would be made in a different session/transaction.
how will you do that using minimal DBserver resources without TOP n ?

hannes hernler
--------------------------------------------------------
DWS - Delphi Web Script
developing professional web apps
look at http://www.dwscript.com
--------------------------------------------------------