Subject Re: [ib-support] Row 2 column
Author Svein Erling Tysvaer
No, but this should be possible to do through a stored procedure.

HTH,
Set

At 08:12 26.09.2002 +0700, you wrote:
>Thank's for ur comment. But.. i can do it in oracle, i use DECODE
>function. There are any function like DECODE (oracle) in firebird/interbase ?
>
>This the query :
>
>SELECT
> REK,
> SUM(DECODE(JNR, '112', 1, 0)*ANG) AS R112,
> SUM(DECODE(JNR, '321', 1, 0)*ANG) AS R321,
> SUM(DECODE(JNR, '491', 1, 0)*ANG) AS R491,
> SUM(ANG) AS TOTAL
>FROM RTABLE
>GROUP BY REK;