Count # occurrences of one string inside another
Scalar function 'f_contains' counts the number of times the first argument occurs within the second argument.Given: @arg1, @arg2 (both VARCHAR), @cnt INTSELECT @cnt = dbo.f_contains (@f_search_for = @arg1 , @f_container = @arg2)
2002-07-22
382 reads