Problem Note 37221: An error occurs when you use some data and time functions with SAS/ACCESS® Interface to Oracle
The following error might occur when you use some date and time functions with SAS/ACCESS Interface to Oracle:
ERROR: ORA-30076: invalid extract field for extract source
For example, the error occurs if SAS passes the HOUR(column) function to Oracle, where column is an Oracle DATE data type.
You can successfully use the DAY, MONTH, and YEAR functions on Oracle DATE data types.
You can also successfully use DATE, MONTH, YEAR, HOUR, MINUTE and SECOND functions on Oracle TIMESTAMP data types.
Operating System and Release Information
| SAS System | SAS/ACCESS Interface to Oracle | z/OS | 9.2 TS2M0 | |
| Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS2M0 | |
| Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS2M0 | |
| Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS2M0 | |
| Microsoft Windows XP 64-bit Edition | 9.2 TS2M0 | |
| Microsoft® Windows® for x64 | 9.2 TS2M0 | |
| Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS2M0 | |
| Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS2M0 | |
| Microsoft Windows Server 2003 Standard Edition | 9.2 TS2M0 | |
| Microsoft Windows Server 2008 | 9.2 TS2M0 | |
| Microsoft Windows XP Professional | 9.2 TS2M0 | |
| Windows Vista | 9.2 TS2M0 | |
| 64-bit Enabled AIX | 9.2 TS2M0 | |
| 64-bit Enabled HP-UX | 9.2 TS2M0 | |
| 64-bit Enabled Solaris | 9.2 TS2M0 | |
| HP-UX IPF | 9.2 TS2M0 | |
| Linux | 9.2 TS2M0 | |
| Linux for x64 | 9.2 TS2M0 | |
| OpenVMS on HP Integrity | 9.2 TS2M0 | |
| Solaris for x64 | 9.2 TS2M0 | |
*
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.
A possible workaround for this issue is to remove the function in question from the function dictionary, i.e. HOUR(). By doing that, SAS/ACCESS to Oracle will not attempt to pass the function to Oracle.
libname o oracle user=scott pw=tiger path=orcl SQL_FUNCTIONS_COPY=sasuser.orafuncs92 ;
proc sql;
delete from sasuser.orafuncs92 where sasfuncname='HOUR';
quit;
libname o oracle user=scott pw=tiger path=orcl SQL_FUNCTIONS="external_replace=sasuser.orafuncs92";
ORA-30076: Invalid extract field for extract source when using the hour() function on an Oracle data type column
| Type: | Problem Note |
| Priority: | medium |
| Topic: | Data Management ==> Data Sources ==> External Databases ==> Oracle
|
| Date Modified: | 2009-11-05 09:50:30 |
| Date Created: | 2009-09-21 08:57:03 |