0
I’m developing a function that reads from one table and inserts into the other:
The error is: Warning: Function created with build errors.
I removed the select line and it works. So, the error is in it.
create or replace function FC_INS_TIPO_GASTO
return number
as
v_numSubCota transparencia_gastos.numSubCota%type;
v_txtDescricao transparencia_gastos.txtDescricao%type;
begin
select distinct numSubCota into v_numSubCota, txtDescricao into
v_txtDescricao
from transparencia_gastos
where sgUF='PB' or sgUF='PE';
insert into tipo_gasto
(cod_tipo_gasto, des_tipo_gasto, dtc_cadastro)
values
(v_numSubCota, v_txtDescricao, systimestamp);
return 0;
end;
/
Can’t select dentor from Begin end? But I’ve tested it out of the block and it doesn’t work either.