Subject Cross Tab queries
Author Ruggero Maffei
Hi to all,
sorry for the repost, but nobody answers the first post.. perhaps it's not possible to do it (cross tab queries) but i would like to know directly from the gurus...

Here it is the original post:

Hi to all,
i'm trying to build a cross tab query in Firebird 1.0 but i'm not able to do it.

I want to use something similar to:

SELECT companyname,
SUM (if productname='Box' then 1 else 0) as "BOX",
SUM (if productname='Package' then 1 else 0) as "Package"
...
GROUP BY companyname

but I think that FB 1.0 doesn't support if-then structure nor CASE-WHEN.

Any idea?

Thank you!




[Non-text portions of this message have been removed]