dUros (12/2/2011)
I expected function like that. Is string numeric or not.
There's no need to use a while loop, it's unnecessary!
You can find non-matches in a string in one line with PATINDEX using the ^ to invert the search. See http://msdn.microsoft.com/en-us/library/ms188342.aspx
SELECT PATINDEX('%[^0-9]%', '123')
SELECT PATINDEX('%[^0-9]%', '123a')