create function[dbo].[fn_StripNonNumeric]( @string varchar(max)) returns varchar(max) as begin if patindex('%[^0-9]%', @string) > 0 while patindex('%[^0-9]%', @string) > 0 set @string = stuff(@string, patindex('%[^0-9]%', @string), 1, '') return @string end
No comments:
Post a Comment