I need to count instances of a set of characters (aeıioöuü) in each row.
For example:
"linebreak" should return 4.
"indent" should return 2
"quote" should return 3
I can count one single character with this:
SELECT LENGTH(col) - LENGTH(REPLACE(col, 'a', ''))
I also found a way of counting a set of characters:
SELECT LENGTH(col) - LENGTH(REPLACE(REPLACE(REPLACE(col, 'a', ''), 'e', ''), 'ı', ''))...
However this query becomes confusing as it continues to grow. Is there a better method with wildcards or something else?