Count number of characters w/ SQL

1 · Jake Trent · April 30, 2009, midnight
There’s no pre-defined method to count the number of occurrences of a certain character in a database table column using SQL. There’s a quick and dirty way to get it done however. In my case, I wanted to figure out how many lines existed in a column that held address information, separated by line breaks. Here’s a spot of code that helped from the friendly neighborhood DBA, Reed. ...