Usage Note 16832: "Data Value Overflow" Error When Writing Date Values to SQL Server
Using either SAS/ACCESS Interface to ODBC or SAS/ACCESS
Interface to OLE DB, with the libname engine statement
to access a SQL Server database from SAS, and then using
a datastep or Proc SQL to create a table in the SQL Server
database from SAS can return the following error:
libname mylib odbc dsn=SQLServ user=xxxx pwd=yyyyy schema=dbo;
proc sql;
create table mylib.NewTable as
select *
from SASData;
quit;
ERROR: During insert: Data was not set for one or more columns.
Data value overflow for column COLUMN_NAME.
This error will be returned when the data set contains a date that
is not within the range of valid dates for SQL Server.
Date and time data is stored by SQL Server using the datetime and
smalldatetime data types.
Use datetime to store dates in the range from January 1, 1753
through December 31, 9999.
Use smalldatetime to store dates in the range from January 1, 1900
through June 6, 2079.
Operating System and Release Information
| SAS System | SAS/ACCESS Interface to ODBC | Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 | |
| Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 | |
| Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 | |
| Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M3 | |
| Microsoft Windows XP 64-bit Edition | 9.1 TS1M3 | |
| Microsoft Windows NT Workstation | 9.1 TS1M3 | |
| Microsoft Windows XP Professional | 9.1 TS1M3 | |
| Microsoft Windows 2000 Professional | 9.1 TS1M3 | |
| Microsoft Windows 2000 Server | 9.1 TS1M3 | |
| Microsoft Windows 2000 Advanced Server | 9.1 TS1M3 | |
| Microsoft Windows 2000 Datacenter Server | 9.1 TS1M3 | |
*
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: | Usage Note |
| Priority: | low |
| Topic: | Third Party ==> Information Exchange ==> ODBC (Open Database Connectivity) SAS Reference ==> LIBNAME Engines
|
| Date Modified: | 2008-03-04 14:45:27 |
| Date Created: | 2006-01-11 15:22:37 |