Click here to Skip to main content
15,897,273 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

when i convert the varchar column to bigint it shows arithmetic overflow conversion
error , please help me how to convert a varchar column to bigint

Thanks,
Ramesh.m
Posted
Updated 12-Dec-12 0:20am
v2

 
Share this answer
 
bigint allow range...
-9223372036854775808 through 9223372036854775807


so, you have larger value so,it will give this error

you can use numeric datatype as below...
SQL
select convert(numeric(38,0),'9999999999999999999')


note: 38 is max digits limit for numeric datatype

Happy Coding!
:)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900