Select Patient_age,
DECODE (sign(15-patient_age),1,'Over 15',-1,'Below 15','15 Years Old')
from table_name;
Sign function returns three values 1, if positive, -1 if negative or 0.
HTH,
Anurag.
|
Results 1 to 8 of 8
Thread: DECODE functionThreaded View
|
Click Here to Expand Forum to Full Width |