SilverStray
Programmer
I have this code which contains a sample case statement in MS SQL:
select XchgID, sum(case year(FinancialDte)
when 1991 then FixedAsset else 0 end) as FA_1991,
sum(case year(FinancialDte)
when 1992 then FixedAsset else 0 end) as FA_1992,
sum(case year(FinancialDte)
when 1993 then FixedAsset else 0 end) as FA_1993,
sum(FixedAsset) as FA_total,
count(*)
from Table1
group by XchgID
order by 1, 2
I believe such case statement can likewise be achieved in Oracle by using
'decode' statement.
What is the equivalent of those in Interbase?
Hoping for your help.
SilverStray
select XchgID, sum(case year(FinancialDte)
when 1991 then FixedAsset else 0 end) as FA_1991,
sum(case year(FinancialDte)
when 1992 then FixedAsset else 0 end) as FA_1992,
sum(case year(FinancialDte)
when 1993 then FixedAsset else 0 end) as FA_1993,
sum(FixedAsset) as FA_total,
count(*)
from Table1
group by XchgID
order by 1, 2
I believe such case statement can likewise be achieved in Oracle by using
'decode' statement.
What is the equivalent of those in Interbase?
Hoping for your help.
SilverStray