I am working in SQL Server 2008. I am trying to test whether a string (varchar) has only digit characters (0-9). I know that the IS_NUMERIC function can give spurious results.
Solution: where some_column NOT LIKE '%[^0-9]%' Is correct.
where some_column NOT LIKE '%[^0-9]%'
Just one important note: Add validation for when the string column = '' (empty string). This scenario will return that '' is a valid number as well.
''