SQL Char Count

February 24, 2014 | Posted in SQL Server
A nice and simple way to find the total instances of a specific char in a SQL varchar:
select (len(’1/2/3/4/5/6′) – len(replace(’1/2/3/4/5/6′, ‘/’, ”))) as char_count
February 24, 2014 | Posted in SQL Server
A nice and simple way to find the total instances of a specific char in a SQL varchar:
select (len(’1/2/3/4/5/6′) – len(replace(’1/2/3/4/5/6′, ‘/’, ”))) as char_count