Subject | RE: [firebird-support] SELECT FIRST & COUNT |
---|---|
Author | Svend Meyland Nicolaisen |
Post date | 2004-04-12T15:24:27Z |
Stupid me. The FIRST argument ofcourse works as it should. The FIRST
argument always limits the number of rows returned, but in this case only
one row is returned in any case. "SELECT FIRST 0 COUNT(*) FROM TestTable"
does have an effect.....
But anyway. Is there any way to limit the number of records counted?
-
SMN
argument always limits the number of rows returned, but in this case only
one row is returned in any case. "SELECT FIRST 0 COUNT(*) FROM TestTable"
does have an effect.....
But anyway. Is there any way to limit the number of records counted?
-
SMN
> -----Original Message-----
> From: Svend Meyland Nicolaisen [mailto:news@...]
> Sent: 12. april 2004 17:00
> To: firebird-support@yahoogroups.com
> Subject: [firebird-support] SELECT FIRST & COUNT
>
>
> 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
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>