This script will return how many time one string occurs within another. It will only work on SQL 2K as it is a UDF, but it could be converted to a stored proc with a output variable for SQL 7.0.
2007-10-02 (first published: 2002-06-20)
15,451 reads