Hi,
In Apex 20.2
I have a process that insert a page item into another table before the automatic row processing.
The page item is not bound to any field.
This is the code:
declare
l_dname varchar2(100);
begin
l_dname := upper( trim( :P45_NEW_LOCAL ) );
insert into risk_locales ( local, organizacion_id )
values( l_dname, :P45_ORGANIZACION_ID )
returning local into :P45_LOCAL;
exception when dup_val_on_index
then
-- if local already exists, fetch id
select local
into :P45_LOCAL
from risk_locales
where 1 = 1
and local = l_dname
;
end;
The problem is that am getting ORA-01400: cannot insert NULL into ("RISKMANDEV"."RISK_LOCALES"."LOCAL"). I checked in the session and :P45_NEW_LOCAL has a value. Why am I receiving that message.
What could be a happening?
Thanks for the help!