Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Looking for a SQL Function
On 2005-11-02, RalfB <db.2.gemini_at_spamgourmet.com> wrote:
>> 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.
>
> SELECT (LENGTH('abcdefabc') - LENGTH(REPLACE('abcdefabc','abc'))) /
> LENGTH('abc')
> FROM dual;
Very clever! Someone is using his brain.
-- Rene Nyffenegger http://www.adp-gmbh.ch/Received on Wed Nov 02 2005 - 15:50:14 CST