Subject | Re: [firebird-support] Cross Tab queries |
---|---|
Author | Arno Brinkman |
Post date | 2003-12-19T12:30:07Z |
Hi,
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
> > No, Fb 1.0 does not. Fb 1.5 does support CASE..WHEN.Almost, a litlle small detail. You forgot the END ;-)
>
> 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'
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