Arithmetic overflow error | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Arithmetic overflow error

Hi Friends, When i am trying to import data from flat files to import table, i am getting the following error. Server: Msg 220, Level 16, State 3, Line 2
Arithmetic overflow error for data type smallmoney, value = 428496. This is the code: insert into f_New_Day_Store_Inventory select distinct gDay,gStore,gIngredient
,isnull(WasteAmt/100,0)as WasteAmt,isnull(Overshort$/100,0)as OverShort$ from i_NewInventoryData
if i try to use the select statement, it is working fine. when i am trying to insert into fact table it is giving error. in fact table all fields are smallmony data type, except first four fields. If anybody know this problem please help me. [email protected]
Thank you,
Srinivasa kale
small money only allows values between – 214,748.3648 through +214,748.3647, your value of 428,496 is too big for a small money field, hence the overflow message. this needs to be a different format, perhaps just money. chris