Usage Note 65690: The message "Arithmetic overflow error..." occurs when you write to Microsoft SQL Server using SAS/ACCESS® Interface to ODBC
When writing large decimal values in Unicode SAS® to SQL Server using SAS/ACCESS Interface to ODBC, you can get the following error:
ERROR: CLI execute error: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Arithmetic overflow error converting float to data type numeric.
Microsoft][ODBC Driver 11 for SQL Server][SQL Server]The statement has been terminated.
NOTE: The SAS System stopped processing this step because of errors.
The problem occurs when you write large, unformatted values to SQL Server. If you run the CONTENTS procedure on the SAS data set, you might see a value similar to the following:
Myvariable Num 8 F16.15 BEST16
Note: In the value above, BEST16 is the unformatted value.
The problem occurs regardless of which ODBC driver you use. It does not occur in Latin1 SAS.
To circumvent the problem, add a format to the variable using a FORMAT statement similar to the one below:
data new;
set original;
format myvariable best17.15;
run;
Operating System and Release Information
| SAS System | SAS/ACCESS Interface to ODBC | Microsoft® Windows® for 64-Bit Itanium-based Systems | | |
| Microsoft Windows Server 2003 Datacenter 64-bit Edition | | |
| Microsoft Windows Server 2003 Enterprise 64-bit Edition | | |
| Microsoft Windows XP 64-bit Edition | | |
| Microsoft® Windows® for x64 | | |
| OS/2 | | |
| Microsoft Windows 8 Enterprise 32-bit | | |
| Microsoft Windows 8 Enterprise x64 | | |
| Microsoft Windows 8 Pro 32-bit | | |
| Microsoft Windows 8 Pro x64 | | |
| Microsoft Windows 8.1 Enterprise 32-bit | | |
| Microsoft Windows 8.1 Enterprise x64 | | |
| Microsoft Windows 8.1 Pro 32-bit | | |
| Microsoft Windows 8.1 Pro x64 | | |
| Microsoft Windows 10 | | |
| Microsoft Windows 95/98 | | |
| Microsoft Windows 2000 Advanced Server | | |
| Microsoft Windows 2000 Datacenter Server | | |
| Microsoft Windows 2000 Server | | |
| Microsoft Windows 2000 Professional | | |
| Microsoft Windows NT Workstation | | |
| Microsoft Windows Server 2003 Datacenter Edition | | |
| Microsoft Windows Server 2003 Enterprise Edition | | |
| Microsoft Windows Server 2003 Standard Edition | | |
| Microsoft Windows Server 2003 for x64 | | |
| Microsoft Windows Server 2008 | | |
| Microsoft Windows Server 2008 R2 | | |
| Microsoft Windows Server 2008 for x64 | | |
| Microsoft Windows Server 2012 Datacenter | | |
| Microsoft Windows Server 2012 R2 Datacenter | | |
| Microsoft Windows Server 2012 R2 Std | | |
| Microsoft Windows Server 2012 Std | | |
| Microsoft Windows Server 2016 | | |
| Microsoft Windows Server 2019 | | |
| Microsoft Windows XP Professional | | |
| Windows 7 Enterprise 32 bit | | |
| Windows 7 Enterprise x64 | | |
| Windows 7 Home Premium 32 bit | | |
| Windows 7 Home Premium x64 | | |
| Windows 7 Professional 32 bit | | |
| Windows 7 Professional x64 | | |
| Windows 7 Ultimate 32 bit | | |
| Windows 7 Ultimate x64 | | |
| Windows Millennium Edition (Me) | | |
| Windows Vista | | |
| Windows Vista for x64 | | |
| 64-bit Enabled AIX | | |
| 64-bit Enabled HP-UX | | |
| 64-bit Enabled Solaris | | |
| AIX | | |
| HP-UX | | |
| HP-UX IPF | | |
| Linux | | |
| Linux for x64 | | |
| Linux on Itanium | | |
| OpenVMS Alpha | | |
| Solaris | | |
| Solaris for x64 | | |
| Tru64 UNIX | | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
The message "Arithmetic overflow error..." can occur when you write values with a large decimal value to SQL Server. To circumvent the error, format the column in SAS to use 15 decimal digits.
| Date Modified: | 2020-03-16 15:18:06 |
| Date Created: | 2020-03-13 12:19:24 |