Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help please with Oracle
"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