Created
June 1, 2022 10:03
-
-
Save morriekken/1a511cfed18c6bf49a8229f3c9298be4 to your computer and use it in GitHub Desktop.
SQL, Count characters (commas) in string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
LEN(col) - LEN(REPLACE(col, ',', '')) count_commas | |
FROM table |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment