I\'m trying to count how many words there are in a string in SQL.
Select (\"Hello To Oracle\") from dual;
I want to show the number of wor
If your requirement is to remove multiple spaces too, try this:
Select length('500 text Oracle Parkway Redwood Shores CA') - length(REGEXP_REPLACE('500 text Oracle Parkway Redwood Shores CA',
'( ){1,}', '')) NumbofWords
from dual;
Since I have used the dual
table you can test this directly in your own development environment.