Subject | Re: [firebird-support] First XXX Clause |
---|---|
Author | Paul Vinkenoog |
Post date | 2007-07-08T23:31:02Z |
Hello Luiz,
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
> Does the FIRST XXX clause was removed from firebird 2.0No, but the ROWS syntax is preferred.
> this is the failing queryIt would help if you showed the exact error message.
> SELECT FIRST 1 A.* FROM "DCETARQU" A WHERE (( A."ARQUIVO" LIKE
> 'DCETARQU%' )) ORDER BY A."ARQUIVO" NULLS FIRST, A."SR_RECNO" NULLS FIRST
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