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: Help please with Oracle

Re: Help please with Oracle

From: Guido Konsolke <Guido.Konsolke_at_triaton.com>
Date: Mon, 5 May 2003 13:29:45 +0200
Message-ID: <1052133780.672728@news.thyssen.com>


"Limner" wrote...
>
> Hi to all
>
> i've a question.
> I need to know how to count how many times it present a particular
caracter
> in a varchar2 field ( i've oracle 9i )
>
> For example: " Pippo|pluto|paperino" and i want to know how many
times
> is present the caracter "|" ( 2 times )
>
> can someone help me in this ??
>
> Thanks in advance
>
> Danilo
>

Hi Danilo,

until someone offers a better solution, here's an ugly one: you have to eliminate all characters that are not '|'. This can be done by using the REPLCAE function. You will need to provide *every* character that *might* occur. Step 2 is to wrap this monster with the LENGTH() function.

hth and someone does better,

Guido Received on Mon May 05 2003 - 06:29:45 CDT

Original text of this message

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