Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Looking for a SQL Function

Re: Looking for a SQL Function

From: RalfB <db.2.gemini_at_spamgourmet.com>
Date: 1 Nov 2005 22:59:18 -0800
Message-ID: <1130914758.706082.314720@o13g2000cwo.googlegroups.com>


> 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;

hth

Ralf Received on Wed Nov 02 2005 - 00:59:18 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US