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.
-- Anurag.
OCP Application Developer
---------------------------------------------------------
"Be not afraid of growing slowly. Be afraid only of standing still."
as Chris said, No - you cannot do directly what you are asking.
Case can be used only in 9i onwards and in PL/SQL only. Question is for Decode.
Truncate can do the job but what if I want to know if the age is equal to 15.
-- Anurag.
OCP Application Developer
---------------------------------------------------------
"Be not afraid of growing slowly. Be afraid only of standing still."
There is allways more than one way to skin the cat...
I will always remember this.
-- Anurag.
OCP Application Developer
---------------------------------------------------------
"Be not afraid of growing slowly. Be afraid only of standing still."
Bookmarks