Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Give SQL Query to find the number words in a sentence ?
ex: 'ram charan singh' then ans:3
Answer:select length(trim('ram charan singh')) - length
(replace
(trim ( 'ram charan singh'),' ','')) +1 from dual

The above query working properly when space between the
words is only one &similar
But ,If the space between the words is nonuniform.
Ex:'ram charan singh is good' ans:5
i am not getting this answer using above query.

Answer Posted / aseem k

a is only column for table e

select a,length(regexp_replace(regexp_replace(a, '[^ ]
{1,}','1') ,'( +){1,}',''))
from e
/

it took me exactly 90 min's

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what happened to the global index when I truncate the data in one of the partition?

2022


What is the difference between post-database commit and post-form commit?

1202


Can we insert data in view oracle?

1039


What is flashback in Oracle?

1019


How view is different from a table?

1036


How to change program global area (pga) in oracle?

1095


What are the arithmetic operations?

1084


What is background process in Oracle?

1101


How do we display rows from the table without duplicates?

972


How to create a server parameter file?

1137


Explain oracle 12c new features for developers?

1059


How to use select statement to count the number of rows in oracle?

1046


what is normalisation?what are its uses?

2273


What the is the diff between local index and global index. give some example.

1640


Why do I get unexpected characters from 8-bit character sets in weblogic jdriver for oracle?

1087