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 / devraj

Select Length('ram charan singh') - length(replace('ram
charan singh', ' ','')) from dual;

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between translate and replace in oracle?

1170


can u send the sql dumps to sivakumarr1987@gmail.com plz help me

3053


Why do you create or replace procedures rather that drop and recreate.

1013


How translate command is different from replace?

1090


What is a partition in oracle?

1126


Explain mutating triggers.

1034


What is the database name in oracle?

1022


Explain the different normalization forms?

1110


What is a proxy object?

1070


Can you tell me how to add new column in existing views?how?How is possible?

1451


What is truncate oracle?

977


Explain about the analyze command in oracle?

1056


How do we create privileges in oracle?

1049


Is a rollback possible to any savepoint?

1101


What is catalog in Oracle?

1371