Answer the question
In order to leave comments, you need to log in
Why doesn't the oracle function compile?
create or replace function aaa_aaa(
cel_cred in number,
prog_cred in number)
return varchar2 is
res varchar2(10);
begin
select case
when ABC in(206, 207, 208, 209, 210, 211, 212, 220, 221, 17) then '206'
end as res
from TABLE_NAME t;
return res;
end aaa_aaa;
Answer the question
In order to leave comments, you need to log in
select case
when ABC in(206, 207, 208, 209, 210, 211, 212, 220, 221, 17) then '206'
end INTO res
In PLSQL blocks, columns in selects must be bound to variables, unlike SQL selects. PLSQL is a language separate from SQL, SQL-like commands/queries are different there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question