Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Looking for a SQL Function
R. P. schrieb:
> Is there an Oracle character function returning the number of occurances
> of a substring in a string? INSTR() is close but not quite what I am
> looking for.
>
> Thanks,
> Rudy
SQL> var line varchar2(100);
SQL> exec :line:='abcde abc abc abs abcde';
PL/SQL procedure successfully completed.
SQL> var matches number;
SQL> exec :matches:=owa_pattern.change(:line,'abc','abc','g');
PL/SQL procedure successfully completed.
SQL> print matches
MATCHES
4
SQL> Best regards
Maxim Received on Wed Nov 02 2005 - 03:07:38 CST