1
Good morning, I’m performing a query to query data in a Long-type field. I created the following Function to bring the data:
CREATE OR REPLACE FUNCTION "SEARCH_LONG" (r rowid) return varchar2 is
temporary_varchar varchar2(32000);
begin
select pm.ds_evolucao into temporary_varchar from dbamv.pre_med PM where rowid=r;
return temporary_varchar;
end;
But when executing the query
SELECT pre.cd_atendimento,pre.hr_pre_med,pre.cd_prestador
from (select a1.cd_atendimento,search_long(a1.rowid)
ds_evolucao,a1.HR_PRE_MED,a1.CD_PRESTADOR
from pre_med a1) pre
where upper(pre.ds_evolucao) like '%SEPSE%'
and pre.hr_pre_med > '01/08/2019'
and cd_atendimento not in
(SELECT P.CD_ATENDIMENTO
FROM ITPRE_MED IT
JOIN PRE_MED P ON IT.CD_PRE_MED = P.CD_PRE_MED
WHERE CD_TIP_PRESC = 74076 )
Is returning me this error message:
ORA-06502: PL/SQL: erro: buffer de string de caracteres pequeno demais numérico ou de valor ORA-06512: em "DBAMV.SEARCH_LONG", line 5
What kind of your column die
ds_evolucao
– Sorack
Like Long @Sorack
– Alexandre Quirino de Faria