This is my query I am inserting a values in the in the temp table, but I am getting the error like this..
Arithmetic overflow error converting
money to data type numeric.
Query is:
DECLARE @EBT money
Declare @ConversionRatio money
Declare @TotalRevenues money
insert into #SummarySheet(Item,INR,Dollar,Percentage)
VALUES ('EBT', isnull(@EBT,0), isnull(@EBT,0)/isnull(@ConversionRatio,0),
isnull(@EBT,0)/isnull(@TotalRevenues,0))
FYR:
The values are:
@TotalRevenues="1.00"
@EBT="-50995944.26"
@ConversionRatio="44.5"
How to rectify it….
Your table isn’t money.
It’s numeric (decimal): and not wide enough for the calculated value
Also, to avoid divide by zero errors, these 2 calculations
should be