SAS Support Site Home | Samples and SAS Notes Home
SAS Notes V6-ODBC.DRIVER-E347
Querying DATETIMEw.d field using SAS ODBC driver fails


When using a Windows application to access SAS data files through the SAS ODBC driver you may receive incorrect results when performing a query on a DATETIMEw.d field. If the Windows application is querying a field with a format of DATETIMEw.d, the query will fail with an empty result set. No data will be retrieved even though there is truly data that matches the criteria requested.

In several cases, an error will be issued in the Windows application, when the DATETIME data is not retrieved. These errors will differ depending on the application being used to retrieve the SAS data. These errors may include 'invalid date string encountered', 'unable to retrieve datatime field', and 'error in sql string- no data found'.

To circumvent the problem you must split the DATETIME field into a DATE part variable, and a TIME part variable in the SAS dataset.


Products: BASE
Component: ODBC.DRIVER
Priority: HIGH
Status: Outstanding Problem
Date: Tue, 20 Jan 1998

System Release Reported Release Fixed
Windows NT 6.12 TS020 6.12 TS045  
Windows 95 6.12 TS020 6.12 TS045  

No Fixes Available