SQL Server – Find occurrences of text in a string


select (LEN(@string)-LEN(REPLACE(@string,@strToFind,'')))/LEN(@strToFind)

Leave a Reply

Your email address will not be published. Required fields are marked *