Subject Re: [firebird-support] Why field alias can not be used in where clause?
Author Jonathan Neve
Glebas wrote:

>Hello,
>
>Using FB1.52 on Windows:
>
>select tbl.fld as alias from tbl where alias is null
>
>complains about 'alias' in 'where' clause:
>'Column does not belong to referenced table'
>
>
FB 1.5.2 doesn't support using aliases in the where clause.

>in firebird 2 release notes I found that now field aliases can be used
>in 'order by' and 'group by'. But why 'where' clause is so special?
>
>
I agree, it would be nice. Perhaps in a future version.

I suggested that once, but I was told that it would be difficult because
(IIRC) the where clause is evaluated before the fields in the select.

--
Best regards,
Jonathan Neve
_______________
CopyTiger - advanced database replicator for Interbase/Firebird!
Web : http://www.microtec.fr/copycat/ct
_______________________________________
CopyCat - database replication components for Delphi/C++Builder!
Web : http://www.microtec.fr/copycat/cc