468,242 Members | 1,591 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,242 developers. It's quick & easy.

how to convert varchar to int

there is a varchar column named emp_ref_no and it's length 20, I tried to convert it into int

select cast(emp_ref_no as int)
from tables
where isnumeric( emp_ref_no ) =1

however I got error message:

The conversion of the varchar value '133261280299' overflowed an int column. Maximum integer value exceeded.

Is anyone can help? many thanks
Nov 21 '08 #1
2 5292
ck9663
2,878 Expert 2GB
Check the limits of numeric data types here

-- CK
Nov 21 '08 #2
ck9663,
I got it, thank you very much!
Nov 23 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

19 posts views Thread by Lauren Quantrell | last post: by
2 posts views Thread by Rudi Groenewald | last post: by
4 posts views Thread by v0lcan0 | last post: by
2 posts views Thread by kirke | last post: by
10 posts views Thread by satishrajana | last post: by
6 posts views Thread by tshad | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.