Problem Note 11822: Incorrect WHERE passed to Teradata when OR condition is used with a DATE
variable
When using the LIBNAME ACCESS engine, an incorrect WHERE clause is
generated and passed to Teradata when OR conditions are used and the
variable being subsetted on is a DATE variable. The OR conditions is
switched to an IN operator. However, in Teradata the IN operator allows
only constants and won't allow multiple formatting parameters.
So a query with the following WHERE:
where date = '01jan2002'd or date='03dec2001'd
would generate the following:
WHERE ( ("DAT_ESTINZIONE" IN ('01/01/2002' (DATE, FORMAT
'MM/DD/YYYY'),'12/03/2001' (DATE, FORMAT
'MM/DD/YYYY') ) ) )
which would produce an error similiar to the following:
ERROR: Teradata prepare: Syntax error, expected something like ')'
between ')' and ','
A Technical Support hot fix for Release 8.2 (TS2M0) for this
issue is available at:
http://www.sas.com/techsup/download/hotfix/82_sbcs_prod_list.html#011822
Operating System and Release Information
| Product Family | Product | System | Reported Release | Fixed Release* |
| SAS System | SAS/ACCESS Interface to Teradata | Microsoft Windows XP Professional | 8.2 TS2M0 | 9.2 TS1M0 |
| Microsoft Windows NT Workstation | 8.2 TS2M0 | |
| Windows Millennium Edition (Me) | 8.2 TS2M0 | |
| Microsoft Windows 95/98 | 8.2 TS2M0 | |
| Microsoft Windows Server 2003 Datacenter Edition | 8.2 TS2M0 | 9.2 TS1M0 |
| Microsoft Windows Server 2003 Enterprise Edition | 8.2 TS2M0 | 9.2 TS1M0 |
| Microsoft Windows Server 2003 Standard Edition | 8.2 TS2M0 | 9.2 TS1M0 |
| Microsoft Windows 2000 Professional | 8.2 TS2M0 | |
| Microsoft Windows 2000 Server | 8.2 TS2M0 | |
| Microsoft Windows 2000 Datacenter Server | 8.2 TS2M0 | |
| Microsoft Windows 2000 Advanced Server | 8.2 TS2M0 | |
| HP-UX | 8.2 TS2M0 | 9.2 TS1M0 |
| ABI+ for Intel Architecture | 8.2 TS2M0 | 9.2 TS1M0 |
| z/OS | 8.2 TS2M0 | 9.2 TS1M0 |
| Solaris | 8.2 TS2M0 | 9.2 TS1M0 |
| 64-bit Enabled Solaris | 8.2 TS2M0 | 9.2 TS1M0 |
| 64-bit Enabled HP-UX | 8.2 TS2M0 | 9.2 TS1M0 |
| 64-bit Enabled AIX | 8.2 TS2M0 | 9.2 TS1M0 |
| AIX | 8.2 TS2M0 | 9.2 TS1M0 |
*
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: | alert |
| Topic: | Data Management ==> Data Sources ==> External Databases ==> Teradata SAS Reference ==> LIBNAME Engines
|
| Date Modified: | 2004-03-23 14:31:47 |
| Date Created: | 2004-02-20 10:50:32 |