Home All Groups Group Topic Archive Search About

how can i test a cast before it throws an error

Author
8 Sep 2005 8:38 PM
Abraham Luna
i have CAST([PhoneWork] AS bigint) in my select statement. if the varchar
has non-integer characters, how can i test the cast because its throwing
errors right now

Author
8 Sep 2005 9:00 PM
Jens Süßmeyer
Check ISNUMERIC() in the BOL

HTH, Jens Suessmeyer.

Show quote
"Abraham Luna" <a**@rdk.com> wrote in message
news:ONFI5ULtFHA.3080@TK2MSFTNGP15.phx.gbl...
>i have CAST([PhoneWork] AS bigint) in my select statement. if the varchar
>has non-integer characters, how can i test the cast because its throwing
>errors right now
>
Author
8 Sep 2005 10:40 PM
ML
And after that read this:
http://www.aspfaq.com/show.asp?id=2390


ML
Author
9 Sep 2005 3:13 AM
Abraham Luna
thank you, gonna create my first function :)


Show quote
"ML" <M*@discussions.microsoft.com> wrote in message
news:9A470410-1796-46EB-B604-B53FFE26268E@microsoft.com...
> And after that read this:
> http://www.aspfaq.com/show.asp?id=2390
>
>
> ML

AddThis Social Bookmark Button