Our program closes year end and purges data.
It errors with [Microsoft][ODBC SQL Server Driver][SQL Server]Arithmetic overflow error converting numeric to data type numeric.
From what I have been finding this statemet gets the error...
UPDATE InvWarehouse SET PrevYtdSalesVal = YtdSalesValue, PrevYearQtySold = CONVERT (DECIMAL(14,2), YtdQtyIssued + YtdQtySold), YtdSalesValue = 0, YtdQtySold = 0, YtdQtyIssued = 0
I think there must be a bad value somewhere in either of these fields PrevYtdSalesVal or YtdSalesValue
Is there a way to find where the bad data is? I am a newbie to writing sql queries.