Subject check if content string is integer
Author kittikira
I need to check the content of a varchar if it is possible to cast as integer.
cast raises an exception, if it the varchar is not compatuble with integer.

In a trigger I want to store the numeric value of a varchar field into an integer field, if the varchar contents anything that is possible to convert. If it is not possible I want the integer field to be set to 0.

Is there a way to do so, without using an udf?