adonetok
SSCrazy Eights
Points: 8395
More actions
March 4, 2014 at 10:14 am
#283059
I try to run code but got an error. How to fix it?
SELECT Cast(('20140304800084500001') AS BIGINT)
Arithmetic overflow error converting expression to data type bigint
Jack Corbett
SSC Guru
Points: 184394
March 4, 2014 at 10:18 am
#1693982
That value is larger than the max value for BIGINT so you need to use a different datatype like this:
SELECT Cast(('20140304800084500001') AS DECIMAL(20, 0))
Jack CorbettConsultant - Straight Path SolutionsCheck out these links on how to get faster and more accurate answers:Forum Etiquette: How to post data/code on a forum to get the best help Need an Answer? Actually, No ... You Need a Question
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply