SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 33094: Incorrect results might be generated when you use the LIBNAME statement to join multiple Oracle tables

DetailsHotfixAboutRate It

Incorrect results might be generated when you use the Oracle access engine in a LIBNAME statement to join multiple Oracle tables and when the query contains both inner and outer joins. The results are incorrect because one of the join criteria is left out when the query is passed to Oracle.

The following example code shows a query that demonstrates this behavior:

proc sql; select t3.zip_id,t3z.zip_id from test.SERVICE T5, test.CARE T1 left join test.product T11 on T1.GRP_ID = T11.GRP_ID, test.MEMBER T3 left join test.ZIP_CODE T3Z on T3.ZIP_ID=T3Z.ZIP_ID where T5.SERV_ID=T1.SERV_ID and T3.MBR_ID=T1.MBR_ID; quit;

In this case, the condition joining T3 and T3Z is not included in what is sent to Oracle to be processed. If you use the SASTRACE= option, you can see the query that is submitted to Oracle by SAS:

select T3."ZIP_ID", T3Z."ZIP_ID" from SERVICE T5, CARE T1, PRODUCT T11, MEMBER T3, ZIP_CODE T3Z where T1."GRP_ID" = T11."GRP_ID" (+) and ((T5."SERV_ID" = T1."SERV_ID") and (T3."MBR_ID" = T1."MBR_ID"))

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

Note: This problem does not occur in SAS® 9.2.



Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemSAS/ACCESS Interface to Oraclez/OS9.1 TS1M3 SP49.2 TS1M0
Microsoft® Windows® for 64-Bit Itanium-based Systems9.1 TS1M3 SP49.2 TS1M0
Microsoft Windows Server 2003 Datacenter 64-bit Edition9.1 TS1M3 SP49.2 TS1M0
Microsoft Windows Server 2003 Enterprise 64-bit Edition9.1 TS1M3 SP49.2 TS1M0
Microsoft Windows XP 64-bit Edition9.1 TS1M3 SP49.2 TS1M0
Microsoft® Windows® for x649.1 TS1M3 SP49.2 TS1M0
Microsoft Windows 2000 Advanced Server9.1 TS1M3 SP4
Microsoft Windows 2000 Datacenter Server9.1 TS1M3 SP4
Microsoft Windows 2000 Server9.1 TS1M3 SP4
Microsoft Windows 2000 Professional9.1 TS1M3 SP4
Microsoft Windows NT Workstation9.1 TS1M3 SP4
Microsoft Windows Server 2003 Datacenter Edition9.1 TS1M3 SP49.2 TS1M0
Microsoft Windows Server 2003 Enterprise Edition9.1 TS1M3 SP49.2 TS1M0
Microsoft Windows Server 2003 Standard Edition9.1 TS1M3 SP49.2 TS1M0
Microsoft Windows XP Professional9.1 TS1M3 SP49.2 TS1M0
Windows Vista9.1 TS1M3 SP49.2 TS1M0
64-bit Enabled AIX9.1 TS1M3 SP49.2 TS1M0
64-bit Enabled HP-UX9.1 TS1M3 SP49.2 TS1M0
64-bit Enabled Solaris9.1 TS1M3 SP49.2 TS1M0
HP-UX IPF9.1 TS1M3 SP49.2 TS1M0
Linux9.1 TS1M3 SP49.2 TS1M0
Linux on Itanium9.1 TS1M3 SP49.2 TS1M0
OpenVMS Alpha9.1 TS1M3 SP49.2 TS1M0
Solaris for x649.1 TS1M3 SP49.2 TS1M0
Tru64 UNIX9.1 TS1M3 SP49.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.