If a column contains a certain value (for example, SEEMA
), what method might one to use to determine how many times the letter E
occurs in that value?
Asked
Active
Viewed 70 times
-4
-
Your question is unclear. You should include sample data and desired results, at a minimum. A SQL Fiddle example is really useful. – Gordon Linoff Jan 17 '15 at 19:15
1 Answers
1
regexp_count
should do the trick:
SELECT col, REGEXP_COUNT(col, 'E')
FROM some_table
WHERE col LIKE '%SEEMA%'

Mureinik
- 297,002
- 52
- 306
- 350