Information Storage and Retrieval
Pages
(Move to ...)
Home
About Me
▼
Wednesday, February 17, 2010
Count of a Particular Character in a string
Write a query to count a particular character in a string. e.g Return the number of times 'N' appears in string 'NITININ'. The result shoudl be 3.
Solution:
select length('NITININ') - length(replace('NITININ','N','')) from dual
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment