Subject Re: [firebird-support] Cross Tab queries
Author Arno Brinkman
Hi,

> > No, Fb 1.0 does not. Fb 1.5 does support CASE..WHEN.
>
> Thank you for yuor reply!
> So in FB1.5 it will be possible to use:
>
> SELECT companyname,
> SUM (CASE WHEN productname='Box' THEN 1 ELSE 0) as 'BOX',
> SUM (CASE WHEN productname='Package' THEN 1 ELSE 0) as 'Package'

Almost, a litlle small detail. You forgot the END ;-)

SELECT
companyname,
SUM (CASE WHEN productname='Box' THEN 1 ELSE 0 END) as 'BOX',
SUM (CASE WHEN productname='Package' THEN 1 ELSE 0 END) as 'Package'

Regards,
Arno Brinkman
ABVisie

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird links :
http://www.firebirdsql.com
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/


Nederlandse firebird nieuwsgroep :
news://80.126.130.81