Subject Re: [ib-support] migration question 2
Author Helen Borrie
At 01:12 PM 12/04/2003 +0800, you wrote:
>Hello ib-support: In a web site project,I want to split the query result
>into Multi-pages.With Oracle ,I use the SQL statement:
>SELECT * FROM
> (SELECT ROWNUM rnm,a.* FROM ( SELECT * FROM customer WHERE ...... ORDER
> BY cus_id ) a
> WHERE ROWNUM <10)
>WHERE rnm >=1
>
>How can I write the sql whit FireBird 1.02?

Embedded rowsets are not supported and Firebird doesn't have row numbers.

You can achieve a similar effect using
SELECT FIRST m SKIP n * FROM CUSTOMER ORDER BY cus_id

This gets you m rows starting at the (n + 1)th row. You can pass m and n
as constants, integer expressions or parameters. You can use a prepared
statement and have your application take care of n.

heLen