string - How to count instances of character in SQL Column -
I have a SQL column that is a string of 100 'Y' or 'N' characters. For example:
YYNYNYYNNNYYNY ...
What is the easiest way to get the number of 'Y' symbols in each line?
If MS SQL
SELECT LEN (REPLACE (myColumn, N '' ')) ...
Comments
Post a Comment