SQL - Count keyword in string
Posted on 2014-10-10
Trying to google this, but can't find it anywhere. In my string, I have a set of symbols and I would like to count how many times it repeats.
Example the field is description. The description field would have the following:
If the # shows once, I want it to count once. If it shows twice, it'll count twice. It's always from left to right with the special symbol. How could I count if there's 0 # for the first line, 1 count for the 2nd line etc? The last example, if it's not consecutive, I don't want to count the rest of the repeating "Keyword" or symbol. Is this even possible?