Path: news.easynews.com!core-easynews!newsfeed1.easynews.com!easynews.com!easynews!crtntx1-snh1.gtei.net!nycmny1-snh1.gtei.net!news.gtei.net!newsfeed!news.tele.dk!news.tele.dk!small.news.tele.dk!news-fra1.dfn.de!newsfeed.ision.net!news.is-europe.net!ision!not-for-mail
From: "Guido Konsolke" <Guido.Konsolke@triaton.com>
Newsgroups: comp.databases.oracle.tools
Subject: Re: need help with Oracle (for a query)
Date: Mon, 5 May 2003 13:35:52 +0200
Organization: Ye 'Ol Disorganized NNTPCache groupie
Lines: 30
Message-ID: <1052134147.762587@news.thyssen.com>
References: <ZXqta.91802$iy5.2854423@twister2.libero.it>
NNTP-Posting-Host: 149.211.49.31
X-Trace: goliath.news.is-europe.net 1052134555 27793 149.211.49.31 (5 May 2003 11:35:55 GMT)
X-Complaints-To: abuse@is-europe.net
NNTP-Posting-Date: 5 May 2003 11:35:55 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Cache-Post-Path: news.thyssen.com!unknown@170.56.164.197
X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/)
Xref: core-easynews comp.databases.oracle.tools:58783
X-Received-Date: Mon, 05 May 2003 04:35:24 MST (news.easynews.com)

"Limner" wrote (as he did in c.d.o.misc.)...
>
>
> 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
>

Danilo,

since you post in c.d.o.tools you are in a pl/sql environment.
Just perform a loop using SUBSTR() and count the hits.

hth,
Guido


