Question : DECODE

I need to use on the SELECT statement an expression that according that I can plug a value. DECODE is the solution but I cannot evaluate an expression  only a value.
HELP

Answer : DECODE

If this is your query:

Select A, B, DECODE(A, 'CRD', DECODE(B, 'ENG', 'SALES', 'CREDIT'), 'CREDIT') ANSWER
FROM TABLE1


This will be you answer:

A          B          ANSWER
---------- ---------- ------
CRD        ENG        SALES
CRD        FRA        CREDIT
TIS        ENG        CREDIT
TIS        CRD        CREDIT

I don't know if that's what you want. Otherwise good you give an example?

Good luck!
Random Solutions  
 
programming4us programming4us