I have a complex data representation that recursively links and summarizes information.
Every night, a scheduled task launches a stored procedure that selects all the data from the data view and inserts it into the table so that users can query and analyze the data much faster than running the select statement in the data view.
The parent table consists of several hundred thousand records, and the result set from export is more than 1,000,000 records.
For most nights, the export process works without any problems, however, if the user enters an incorrect value in our main ERP system, it will cause failures in the night process, because one of the decimal fields will contain a value that does not fit in some conversions, which I have to do on the data. Debugging and finding a specific, erroneous field can be very difficult and time consuming.
With that said, I read about two SQL settings NUMERIC_ROUNDABORTand ARITHABORT. These sounds are ideal for solving my problem, however, I cannot get them to work with my data presentation or stored procedure.
My stored procedure is nothing but a TRUNCATE and INSERT statement. I added...
SET NUMERIC_ROUNDABORT OFF
SET ARITHABORT OFF
... SP, . , , , .
Data View, , . .
SQL , ?
, , SO-, - . , , . , , , , , .
, ?
UPDATE
, , , , , , . .
, . , decimal (12, 5), CAST( ... AS DECIMAL(12, 5)).
, . , SSMS "" . SSMS Views β [My View] -Columns, , decimal (13, 5).
, , , , decimal(13, 5)?! , , SSMS , . , , , decimal(12, 5).
, , , , . SET , ?
HeavenCore , , .
, . , NUMERIC_ROUNDABORT ARITHABORT OFF.