Subject Re: [firebird-support] First XXX Clause
Author Paul Vinkenoog
Hello Luiz,

> Does the FIRST XXX clause was removed from firebird 2.0

No, but the ROWS syntax is preferred.

> this is the failing query
> SELECT FIRST 1 A.* FROM "DCETARQU" A WHERE (( A."ARQUIVO" LIKE
> 'DCETARQU%' )) ORDER BY A."ARQUIVO" NULLS FIRST, A."SR_RECNO" NULLS FIRST

It would help if you showed the exact error message.

Meanwhile, some remarks (although they're not likely to have anything
to do with your problem):

- NULLS FIRST is not necessary with an ascending sort in Firebird 2.x
(in 1.5, it is).

- Object names in all-caps without spaces or funny characters don't
need to be double-quoted.

- If you're selecting from one single table, why bother with the alias
and the qualifiers ("A.etc")?

- I also wonder what the "((" and "))" are for - you don't need them.

All the above things shouldn't hurt though. But they make the query
look unnecessarily complicated, IMO.


Kind regards,
Paul Vinkenoog