Arithmetic overflow error for type in Sql Server 2000 -


in sql server 2000 table,there column called kpi of float type. when try convert column varchar(cast(kpi varchar(3))),it gives error

msg 232, level 16, state 2, line 1 arithmetic overflow error type varchar, value = 26.100000. 

the thing column has 1 distinct value , 26.1. can not understand why show error when converting varchar!

your error has triggered full stop in 26.1.

you have applied command:

cast(kpi varchar(3)) 

first: change cast varchar(3) varchar(4) (to first value after full stop)

so you'll have:

this line convert value 26.10000000 in 26.1

then apply varchar(26.1) not correct!

varchar type wants integer value size.

why apply last varchar?? think must remove external varchar , leave cast function


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -