Files
apollinare-catering-software/docs/functions/MY_INSTR.md
2025-12-17 13:02:12 +01:00

454 B

MY_INSTR

Codice Sorgente

function my_instr( p_value   varchar2,
                                     p_delim   varchar2 )
return number
as

  i          number;

  l_length   number;

begin

  if p_value is null then
    return null;
  end if;

  i := 1;

  l_length := length(p_value);

  for i in 1..l_length
  loop
    if substr(p_value, i, length(p_delim)) = p_delim then
      return i;
    end if;
  end loop;


  return 0;

end;