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
Explain an exception and its types?
Differentiate between function and procedure in oracle.
How to create a table in a specific tablespace?
How to connect to oracle using service name instead of sid?
What are the ansi data types supported in oracle?
Explain oracle insert into command?
Use of an integrity constraint is better to validate data. Explain
normally database take to refresh time 2 hours. but client asked iwant to refresh with in 5 min that same database. do you have any option in BO and Oracle? explain me briefly...kavi
How to call a stored function with parameters?
Can we call procedure inside function in oracle?
How to change program global area (pga) in oracle?
interview questions with answer for cts
Explain overloading. Can functions be overloaded?
If a parameter is used in a query without being previously defined, what diff. exist betw. report 2.0 and 2.5 when the query is applied ?
Write a trigger example in oracle?