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
List the types of joins used in writing subqueries?
How to use group functions in the select clause using oracle?
How to create a stored procedure in oracle?
What is recovery manager(rman) backup in Oracle?
Is there any way to find out when one specific table/view/M-view is used last time. i.e. when one specific object is used in any SELECT statement.
How to export your own schema?
What is the relation of a user account and a schema?
What are the uses of linked server and explain it in detail?
How to drop an index in oracle?
How to write text literals in oracle?
Hi friends can u send the oracle 9i full version download link?????????????? please reply ?
In not less than 100 words what's the main difference between Rolap and Molap in ORACLE ?
What is merge statement used for?
How to define a record variable to store a table row?
How to filter out duplications in the returning rows using oracle?