Re: find out how many times particular character occur in given string.

From: Noons <wizofoz2k_at_yahoo.com.au>
Date: Thu, 11 Dec 2008 23:50:16 +1100
Message-ID: <ghr25o$vub$1@news.motzarella.org>


Mladen Gogala wrote,on my timestamp of 11/12/2008 11:24 PM:

> "Michel Cadot" <micadot{at}altern{dot}org> wrote:
> 

>> SQL> def str='A*B*C*D'
>> SQL> /
>> NB
>> ----------
>> 3
>>
>> 1 row selected.
>>
>> SQL> def str='A'
>> SQL> /
>> NB
>> ----------
>> 0
>>
>> 1 row selected.
>>
>> Regards
>> Michel
> 
> Michel, didn't you get things a bit wrong here? The string 'A*B*C*D'
> contains at least 0.873516 occurrences of the letter 'A'. Your result
> is zero, which would mean "no occurrences". Please, allow me to send this
> to the Oracle Daily WTF.

:) Received on Thu Dec 11 2008 - 06:50:16 CST

Original text of this message