Is there a way to test if a varchar is cast-able into a int before casting it?
Is there a way to test if a varchar is cast-able into a int before casting it? select (int '3'); works. But I don't know what values I will be getting; I just know that they are supposed to be integers. What I need is something like: select case when isInteger('4') is true then cast('4' as int) else null end as mycolumn;
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.