Scalar function 'f_contains' counts the number of times the first argument occurs within the second argument.
Given: @arg1, @arg2 (both VARCHAR), @cnt INT
SELECT @cnt = dbo.f_contains (@f_search_for = @arg1
, @f_container = @arg2)
2007-10-02 (first published: 2002-06-20)
15,450 reads