is it possible to use the case exp inside a select query
eg:
select 'callduration'=
case when
starttime <>'1/1/1900' then starttime-endtime
else 0
end case from table1
Printable View
is it possible to use the case exp inside a select query
eg:
select 'callduration'=
case when
starttime <>'1/1/1900' then starttime-endtime
else 0
end case from table1
Code:select 'callduration=' ||
case
when starttime <> TO_DATE('01/01/1900','mm/dd/yyyy') then endtime-starttime
else 0
end case
from table1;