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: Rene Nyffenegger <rene.nyffenegger_at_gmx.ch>
Date: Wed, 2 Nov 2005 21:50:14 +0000 (UTC)
Message-ID: <dkbcam$h0a$2@nntp.init7.net>


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

Original text of this message

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