When you use date time literals in SAS/ACCESS Interface to ODBC under UNIX, the following errors might occur:
ERROR: CLI open cursor error: [DataDirect][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
Here is an example of code that can lead to the problem:
libname x odbc dsn=your_dsn" user=your_user pw=password dbconinit="set DATEFORMAT ydm" connection=sharedread ; data x; set x.test; where dt between "28OCT2015:09:00:00"dt and "30OCT2015:11:59:59"dt; run;
Click the Hot Fix tab in this note to access the hot fix for this issue.
Product Family | Product | System | SAS Release | |
Reported | Fixed* | |||
SAS System | SAS/ACCESS Interface to ODBC | 64-bit Enabled AIX | 9.4 TS1M2 | |
64-bit Enabled Solaris | 9.4 TS1M2 | |||
HP-UX IPF | 9.4 TS1M2 | |||
Linux for x64 | 9.4 TS1M2 | |||
Solaris for x64 | 9.4 TS1M2 |