I have the following code to cast nvarchar to integer:
cast(@value as int)
However I have no control of the parameter @value, hence the code might fail. Is there anyway to check if a cast is possible before doing a cast?
See Question&Answers more detail:os