Michael Drechsel
Select and show a part of a result from a query February 27, 2009 06:47PM |
David Egan
Re: Select and show a part of a result from a query February 27, 2009 10:30PM |
Michael Drechsel
Re: Select and show a part of a result from a query February 27, 2009 10:52PM |
Michael Drechsel
Re: Select and show a part of a result from a query February 28, 2009 08:16AM |
David Egan
Re: Select and show a part of a result from a query February 28, 2009 09:46PM |
Michael Drechsel
Re: Select and show a part of a result from a query March 01, 2009 01:41PM |
David Egan
Re: Select and show a part of a result from a query March 03, 2009 09:58AM |
SELECT Code FROM file ORDER BY Code LIMIT 0,100This returns up to 100 records, starting at position 0. This gets translated to
SELECT * FROM (SELECT TOP 100 * FROM (SELECT TOP 100 Code FROM file ORDER BY Code) AS TBL1 ORDER BY Code DESC) AS TBL2 ORDER BY CODEFor the next page the limit clause changes to LIMIT 100,100 and then LIMIT 200,100 and so on. The actual query code then changes to
SELECT * FROM (SELECT TOP 100 * FROM (SELECT TOP 200 Code FROM file etcand
SELECT * FROM (SELECT TOP 100 * FROM (SELECT TOP 300 Code FROM fileand so on.
David Egan
Re: Select and show a part of a result from a query March 03, 2009 11:02PM |
Michael Drechsel
Re: Select and show a part of a result from a query March 03, 2009 11:06PM |
David Egan
Re: Select and show a part of a result from a query March 03, 2009 11:34PM |
HExecuteSQLQuery(ds_test,hQueryDefault,"SELECT * from testdat order by code") gi_top = 1 gi_bottom = 10 FOR i = gi_top TO gi_bottom HRead(Testdat,i) TableAddLine(Table1,Testdat.Code,Testdat.Name) ENDButton to load next page
TableDeleteAll(Table1) gi_top = gi_bottom + 1 gi_bottom = gi_top + 9 FOR i = gi_top TO gi_bottom HRead(Testdat,i) TableAddLine(Table1,Testdat.Code,Testdat.Name) ENDButton to load previous page
TableDeleteAll(Table1) gi_top = gi_top - 10 gi_bottom = gi_top + 9 FOR i = gi_top TO gi_bottom HRead(Testdat,i) TableAddLine(Table1,Testdat.Code,Testdat.Name) END
Stefan Bentvelsen
Re: Select and show a part of a result from a query March 06, 2009 08:57AM |
David Egan
Re: Select and show a part of a result from a query March 06, 2009 09:44AM |