I want to determine if a value is integer (like TryParse in .NET). Unfortunatelly ISNUMERIC does not fit me because I want to parse only integers a
TryParse
ISNUMERIC
The following is correct for a WHERE clause; to make a function wrap it in CASE WHEN.
WHERE
CASE WHEN
ISNUMERIC(table.field) > 0 AND PATINDEX('%[^0123456789]%', table.field) = 0