Subject DECODE
Author ibrahim Bulut
When I sarted to learn sql, I was reading an oracle book.
The first 80 page is about base sql.
But there is an sql statement this book.
And it is very interesting.

SELECT NAME, FIRSTNAME, LASTNAME,
DECODE(JOB, 'SALES','1','ACCOUNT','2','MANAGER','3') FROM TABLE1;

Fetched records:

John, AAa, AAA, AAAAAAAA, 1
Michale, bbb, ccc, ccccccccccc, 3
Alice, gggg, aaaaaaa, gggggggg, 2

I understand, decode like a case clause.

Case Decode Of
Sales : Result:=1;
Account : Result:=2;
Manager :Result:=3;
End;


Can I do it with interbase.


Ibrahim Bulut
Software Developer
Republic of Turkey