Problem Note 46762: A "numeric field overflow" error occurs when you create or insert data into a Greenplum database table
A numeric overflow error might occur when you use SAS/ACCESS® Interface to Greenplum to create or insert data into a Greenplum database table from a SAS data set. The problem occurs if one or more columns in the table has a format that specifies a scale greater than zero.
Here is an example. A SAS data set column has a format of 8.2 and it stores a value of 100,000. Executing either of the two code samples below can produce the error.
Example 1:
proc sql;
create db.table as
select * from sas.table;
quit;
Example 2:
data db.table;
set sas.table;
run;
The error would resemble the following:
ERROR: CLI execute error: [SAS ACCESS to Greenplum][ODBC Greenplum Wire Protocol
driver][Greenplum]ERROR: numeric field overflow(Detail A field with
precision 7, scale 2 must round to an absolute value less than 10^5. Rounded
overflowing value: 100000.00;File numeric.c;Line 3962;Routine apply_typmod;) :
[SAS ACCESS to Greenplum][ODBC Greenplum Wire Protocol driver][Greenplum]Failed
transaction. The current transaction rolled back.
Workaround
To work around this issue, programmatically specify the format on the column by using the SAS DBTYPE= option:
proc sql;
create table db.table(dbtype=(Income='numeric(8,2)' Salary='numeric(8,2)' Cash='numeric(8,2)') as
select * from sas.table;
quit;
Operating System and Release Information
SAS System | SAS/ACCESS Interface to Greenplum | Microsoft® Windows® for x64 | | 9.3 TS1M2 |
Microsoft Windows Server 2003 Datacenter Edition | | 9.3 TS1M2 |
Microsoft Windows Server 2003 Enterprise Edition | | 9.3 TS1M2 |
Microsoft Windows Server 2003 Standard Edition | | 9.3 TS1M2 |
Microsoft Windows Server 2003 for x64 | | 9.3 TS1M2 |
Microsoft Windows Server 2008 | | 9.3 TS1M2 |
Microsoft Windows Server 2008 for x64 | | 9.3 TS1M2 |
Microsoft Windows XP Professional | | 9.3 TS1M2 |
Windows 7 Enterprise 32 bit | | 9.3 TS1M2 |
Windows 7 Enterprise x64 | | 9.3 TS1M2 |
Windows 7 Home Premium 32 bit | | 9.3 TS1M2 |
Windows 7 Home Premium x64 | | 9.3 TS1M2 |
Windows 7 Professional 32 bit | | 9.3 TS1M2 |
Windows 7 Professional x64 | | 9.3 TS1M2 |
Windows 7 Ultimate 32 bit | | 9.3 TS1M2 |
Windows 7 Ultimate x64 | | 9.3 TS1M2 |
Windows Vista | | 9.3 TS1M2 |
Windows Vista for x64 | | 9.3 TS1M2 |
64-bit Enabled AIX | | 9.3 TS1M2 |
64-bit Enabled Solaris | | 9.3 TS1M2 |
HP-UX IPF | | 9.3 TS1M2 |
Linux | | 9.3 TS1M2 |
Linux for x64 | | 9.3 TS1M2 |
Solaris for x64 | | 9.3 TS1M2 |
*
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.
Type: | Problem Note |
Priority: | medium |
Topic: | Data Management ==> Data Sources ==> External Databases ==> GreenPlum
|
Date Modified: | 2012-06-15 17:33:17 |
Date Created: | 2012-06-07 12:27:53 |