Hello Guys
Need some help on the select case statement.
select case
when s.SOURCE_TYPE = 1 then r.SOURCE_REF
when s.PFILE is null then s.FILE
end fileName
from mtas s,
gtas r
where s.ID = r.SOURCE_ID;
sourcetype and source_ref are number datatypes
PFILE and S.FILE are character datatypes
I am getting error as
ORA-00932 inconsitent datatypes number got char
first when condition is number . if i replace first when condition with when s.SOURCE_TYPE = 1 then to_char(r.SOURCE_REF) then it is working fine.
Kindly advise. i am using oracle 12c here
Thanks
S