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: vowels in oracle

Re: vowels in oracle

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Tue, 7 Aug 2007 05:54:25 +0200
Message-ID: <46b7ecf1$0$30780$426a74cc@news.free.fr>

"wajim" <wajim29_at_hotmail.com> a écrit dans le message de news: 1186444143.213413.19310_at_57g2000hsv.googlegroups.com...
| Hi everyone,
| Can somebody give help with a sql statement that retrieves the count
| of vowels in a semtence...
|
| Write a select statement that returns the number of vowels in the
| sentence
| 'Whose line is it anyway'
|
| I have tried something like
|
| select 'Whose line is it anyway'
| count('o', 'e', 'i', 'a', 'y')
| from dual;
|
| it's not working.
|
| Thanks in advance.
|

SQL> with data as (select 'Whose line is it anyway' line from dual)   2 select length(line)-length(translate(line,'xaeiouy','x')) nbVowels   3 from data
  4 /
NBVOWELS


      10

1 row selected.

Regards
Michel Cadot Received on Mon Aug 06 2007 - 22:54:25 CDT

Original text of this message

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