Subject | SELECT FIRST & COUNT |
---|---|
Author | Svend Meyland Nicolaisen |
Post date | 2004-04-12T15:00:23Z |
Hi
Where can I find the specifications for FIRST and SKIP as implemented in
FireBird? I am asking because of the following problem:
I wish to know the exact number of records in a table up to a certain limit.
For example if a query returns less than 2000 records I wish to know the
exact number of records returned. But if the query returns more than 2000
records I just want it to return 2000 (eg. stop counting when reacing 2000).
I have tried with the following query:
SELECT FIRST 2000 COUNT(*) FROM TestTable
But it seems that FireBird is ignoring the FIRST argument when counting
records. Is this how it is intended? Is there any other way I can obtain
what I want?
-
SMN
Where can I find the specifications for FIRST and SKIP as implemented in
FireBird? I am asking because of the following problem:
I wish to know the exact number of records in a table up to a certain limit.
For example if a query returns less than 2000 records I wish to know the
exact number of records returned. But if the query returns more than 2000
records I just want it to return 2000 (eg. stop counting when reacing 2000).
I have tried with the following query:
SELECT FIRST 2000 COUNT(*) FROM TestTable
But it seems that FireBird is ignoring the FIRST argument when counting
records. Is this how it is intended? Is there any other way I can obtain
what I want?
-
SMN