The information in this article applies to:
SUMMARY
Microsoft SQL Server version 6.0 has a new SET option to abort the
truncation of numeric values. The new option NUMERIC_ROUNDABORT specifies
the behavior following a loss of scale for an exact numeric type during
conversion. By default this option is OFF, allowing SQL Server to round the
numeric result and continue processing. When this option is ON, SQL Server
aborts the statement or query that caused the error.
MORE INFORMATIONThe SET NUMERIC_ROUNDABORT option does not allow the least significant digits (or the most significant digits) to be lost for an exact numeric type during conversion. For example, an attempt to insert a value with three digits after the decimal into a numeric datatype with scale two will complete successfully with the default setting NUMERIC_ROUNDABORT OFF, as in the following script:
With the option NUMERIC_ROUNDABORT ON, the insert will abort, as in the
following script:
Additional query words: sql6 convert truncate
Keywords : kbprg kbusage SSrvProg SSrvTran_SQL |
Last Reviewed: December 14, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |