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 and not every kind of number. Is there such thing as ISINT
or something?
Here is some code to make things clear. If MY_FIELD
is not int, this code would fail:
SELECT @MY_VAR = CAST(MY_FIELD AS INT)
FROM MY_TABLE
WHERE MY_OTHER_FIELD = 'MY_FILTER'
Thank you
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…