Is there an easy way to get if string is an integer number (consists only of digits) in MS SQL 2005?
Thank you for your help.
The function ISNUMERIC returns whether a string is numeric, but will return true for non-integers.
So you could use:
WHERE ISNUMERIC(str) AND str NOT LIKE '%.%' AND str NOT LIKE '%e%' AND str NOT LIKE '%-%'