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

From: Mladen Gogala <gogala.mladen_at_gmail.com>
Date: Thu, 11 Dec 2008 13:24:26 +0100
Message-ID: <ghr0pq$hgs$1@news.motzarella.org>


"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.

-- 
http://mgogala.freehostia.com
Received on Thu Dec 11 2008 - 06:24:26 CST

Original text of this message