Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-06502: PL/SQL: numeric or value error: character to number conversion error

Javier PFeb 5 2020 — edited Feb 5 2020

Hi all,

In Apex 19.2

Am getting this error from a DA.

Capture.JPG

This is the code in the DA

declare

l_comision number;

l_prima number;

l_porciento number;

l_tipo_comision varchar2(1);

begin

if to_number(:P33_PRIMA) != 0 AND to_number(:P33_PORC_PRODUCTOR) != 0 then

select tipo_comision into l_tipo_comision from global_organizaciones where organizacion_id = :APP_GET_ORGANIZACION_ID;

l_porciento := :P33_PORC_PRODUCTOR;

IF l_tipo_comision = 'P' THEN

  l\_prima := :P33\_PRIMA;

ELSE

  l\_prima := :P33\_COMISION;

END IF;

l_comision := (l_prima * l_porciento) / 100;

:P33_COM_PRODUCTOR := to_char(l_comision);

end if;

end;

Thanks for the help on this!

Javier

Comments
Post Details
Added on Feb 5 2020
6 comments
297 views