Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Case Statement for Interbase

Status
Not open for further replies.

SilverStray

Programmer
Oct 25, 2001
47
AU
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



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top