hi everyone
I am not sure why I am getting this message. Is someone able to help me figure this out?
There are two virtually identical queries with only difference being the inputs. Each query outputs to a table. Table DBO.NearTermStrikeContribution is populated with the data as expected so that means that portion of the query ran successfully. Table DBO.NextTermStrikeContribution has no data in it so that tells me that the error occured here.
The error says line 957 but I checked that line. There is no conversion happening there.
Error:
Msg 8115, Level 16, State 8, Procedure dbo.WIP_Query1, Line 957 [Batch Start Line 2]
Arithmetic overflow error converting numeric to data type numeric.
Thank you
Run the select without the insert, what type of values are you getting for what would be inserted into STRIKE_CONTRIBUTION?
Is anything in double digits, 99.9999999999999999
If so your numeric(28,27) is invalid for what you want to insert as 28,27 only allows 1 value before the decimal point the maximum value you would be able to insert is 9.999999999999999999999999999, so anything above this is invalid for the table definition.
March 28, 2024 at 12:39 am
Run the select without the insert, what type of values are you getting for what would be inserted into STRIKE_CONTRIBUTION?
Is anything in double digits, 99.9999999999999999
If so your numeric(28,27) is invalid for what you want to insert as 28,27 only allows 1 value before the decimal point the maximum value you would be able to insert is 9.999999999999999999999999999, so anything above this is invalid for the table definition.
Thank you for this tip. This is exactly the issue.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply