Hi,
Can anyone please help me to rectify the problem.
Hi i wrote the following code regarding CASE statement:-
declare
num number :=45;
begin
case num
when num<20 then
dbms_output.put_line('Num is less then 20');
when num<40 then
dbms_output.put_line('Num is less then 40');
else
dbms_output.put_line('Num is less then 60');
end case;
end;
/
but i got the following error:-
case num
*
ERROR at line 4:
ORA-06550: line 4, column 6:
PLS-00615: type mismatch found at 'NUM' between CASE operand and WHEN operands
ORA-06550: line 4, column 1:
PL/SQL: Statement ignored
********** In this error i think datatype mismatch occured but i dont no why it occured **********
Please help with the correct code.
Regards,
Naveen