Check if a variable contains any non-numeric digits in SQL Server
Check for any characters that are not in the range 0 to 9
^
is not in LIKE expressions
IF @rptID LIKE '%[^0-9]%'
--throw error
Check for any characters that are not in the range 0 to 9
^
is not in LIKE expressions
IF @rptID LIKE '%[^0-9]%'
--throw error