Sunday, February 2, 2014

Arithmetic overflow error converting expression to data type int When updating table

Yes, if you try update t1.count1 with t2.count2, and count1 is an int and count2 is a bigint - the logic thing to do is to change the datatype of count1 from int to bigint.


There might be a solution in the case that if the values of count2 did not need to be bigint - i.e. the values falls within an int, maybe you could cast count2 before an update was made.


No comments:

Post a Comment