Subject | Re: [ib-support] migration question 2 |
---|---|
Author | Helen Borrie |
Post date | 2003-04-12T06:14:38Z |
At 01:12 PM 12/04/2003 +0800, you wrote:
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
>Hello ib-support: In a web site project,I want to split the query resultEmbedded rowsets are not supported and Firebird doesn't have row numbers.
>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?
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