Subject Re: [ib-support] Select First x skip y question
Author Mark O'Donohue
Lou Feliz wrote:

>Hello.
>
>First, it is great that this capabilit is in FB. I was trying it out
>and observerd the following behaviour:
>
>Table with 12 rows.
>
>Select first 5 * from table
>Result returns the 5 top rows.
>
>Select first 5 skip 5 * from table
>Result returns rows 5 to 9, not 6 to 10 as I expected.
>
>Is this the normal behaviour? It is not a problem, sometimes nice to
>know the last record in prior fetch is the first in the next set.
>
It was the source of some discussion in firebird-devel, the result being
that skip 5 will be changed to return records 6 - 10.

The current implementation does a skip to record #5, not skip first 5
records.

But it was generally agreed that skipping the first five records and
starting at the 6th one was preferred.

The change has already been checked into CVS and will apear in the next
build.

Cheers

Mark

(Sorry if this appears as a duplicate reply).



--
Your database needs YOU!
http://www.firebirdSQL.org