SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 36177: Incorrect results might occur when you run a PROC SQL join with an additional WHERE clause against Teradata tables

DetailsHotfixAboutRate It

Incorrect results might be returned when you submit an SQL procedure join with an additional WHERE clause that contains the AND or the OR logical operator followed by parentheses.

In rare cases, SAS/ACCESS® Interface to Teradata misplaces parentheses in WHERE clauses that are passed to Teradata for evaluation.

For example, suppose you submit the following code:

libname tlib teradata . . .more options. . . ; proc sql; select a.* from tlib.tab1 a left join tlib.tab2 b on a.col=b.col where a.col2=1 and (b.col2 like 'A%' OR b.col3=2);

In this case, the software translates the WHERE clause as follows, which leads to an incorrect result:

where a."col2"=1 and b."col2" like 'A%' or (b.col3=2)

Select the Hot Fix tab in this note to access the hot fix for this issue.



Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemSAS/ACCESS Interface to Teradataz/OS9.1 TS1M3 SP49.1 TS1M3 SP4
Microsoft Windows 2000 Advanced Server9.1 TS1M3 SP49.1 TS1M3 SP4
Microsoft Windows 2000 Datacenter Server9.1 TS1M3 SP49.1 TS1M3 SP4
Microsoft Windows 2000 Server9.1 TS1M3 SP49.1 TS1M3 SP4
Microsoft Windows 2000 Professional9.1 TS1M3 SP49.1 TS1M3 SP4
Microsoft Windows NT Workstation9.1 TS1M3 SP49.1 TS1M3 SP4
Microsoft Windows Server 2003 Datacenter Edition9.1 TS1M3 SP49.1 TS1M3 SP4
Microsoft Windows Server 2003 Enterprise Edition9.1 TS1M3 SP49.1 TS1M3 SP4
Microsoft Windows Server 2003 Standard Edition9.1 TS1M3 SP49.1 TS1M3 SP4
Microsoft Windows XP Professional9.1 TS1M3 SP49.1 TS1M3 SP4
Windows Vista9.1 TS1M3 SP49.1 TS1M3 SP4
64-bit Enabled AIX9.1 TS1M3 SP49.1 TS1M3 SP4
64-bit Enabled HP-UX9.1 TS1M3 SP49.1 TS1M3 SP4
64-bit Enabled Solaris9.1 TS1M3 SP49.1 TS1M3 SP4
HP-UX IPF9.1 TS1M3 SP49.1 TS1M3 SP4
Linux9.1 TS1M3 SP49.1 TS1M3 SP4
Solaris for x649.1 TS1M3 SP49.1 TS1M3 SP4
* 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.