Subject RE: [firebird-support] Using CIF UDF
Author Steffen Heil
Hi

> >select CIF((APPLICATIONS.CID = 'N/A'), '', APPLICATIONS.ENG_TYPE || '
> >CID') as CI
> > >From APPLICATIONS

> If you're using Fb 1.5 you can use a CASE expression:
>
> select
> ....,
> CASE CIF(CID) = 'N/A' then ''
> ELSE ENG_TYPE || ' ' || CIF(CID) END AS WHATEVER, ....
> from APPLICATIONS

Which should also be faster, since for calling an procedure, all parameters
need to be evaluated, whereas the CASE needs to evaluate the conditional and
the real result expression only.

Regards,
Steffen