counting [message #294530] |
Thu, 17 January 2008 23:17  |
user71408
Messages: 585 Registered: November 2007 Location: NE
|
Senior Member |
|
|
Hi All,
How to find no.of 'S' from the name 'sushanthsharma'.
Plz write a query for this...
Thank you
|
|
|
|
|
|
|
|
|
|
|
|
Re: counting [message #294742 is a reply to message #294741] |
Fri, 18 January 2008 14:27  |
 |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Allright!SQL> SELECT LENGTH(REGEXP_REPLACE(TRANSLATE('sushanthsharma',
2 'abcdefghijklmnopqrstuvwxyz',
3 ' * '
4 ), '[[:blank:]]+', ''
5 )) cnt
6 FROM dual;
CNT
----------------
3
SQL>
|
|
|