I have a table in SQL Server 2008:
Create table ExTable1
(
Fcur varchar(50),
Tcur varchar(50),
Rt numeric(10,10)
)
I am trying to insert the data
Insert into [DB].[dbo].[ExTable1 ](Fcur, Tcur, Rt)
values ('INR', 'EUR', 1)
Error I am getting is
An arithmetic overflow error occurred while converting varchar to numeric data type.
When I change datatype of column Rt to numeric(10,2), above mention query mentioned perfectly fine.
Data which I am going to insert in Rt column may have 10 digits after decimal.
How to fix this?
Basically I got this exception in C# code. So I tried executing the QueryString which was create in C# , directly in SQL server. I faced the same error.
Thanks