Problem Note 7222: Outer join of two (2) DBMS tables via a LIBNAME engine with WHERE clause
subsets may generate incorrect results
A query that contains an outer join of two (2) DBMS tables and further
subsets the query with a WHERE clause may generate incorrect results.
The problem seems to occur when the variable being subset on is not a
date variable. SAS builds the query and passes the outer join to the
DBMS. The SAS engine will also include a WHERE clause (or add to it in
Oracle's case) if the original WHERE clause references a date variable.
If the variable is not a date the condition is not passed over to the
DBMS to be processed nor it is processed by SAS. So any further
subsetting criteria that was intended is not applied and the results
will contain rows that should have been removed as a result of the WHERE
clause.
For example, the following WHERE clause will cause the data to be
appropriately subset based on B_DAY but will still contain any males
that existed originally.
where b_day < '01jan1995'd and gender='F'
This only occurs with outer joins. Inner joins are not affected.
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#007222
For customers running SAS with Asian Language Support (DBCS), this
hot fix should be downloaded from:
http://www.sas.com/techsup/download/hotfix/82_dbcs_prod_list.html#007222
Operating System and Release Information
| SAS System | Base SAS | Microsoft Windows XP Professional | 8.2 TS2M0 | 9 TS M0 |
| Microsoft Windows NT Workstation | 8.2 TS2M0 | 9 TS M0 |
| Microsoft Windows 95/98 | 8.2 TS2M0 | |
| Windows Millennium Edition (Me) | 8.2 TS2M0 | |
| Microsoft Windows 2000 Server | 8.2 TS2M0 | 9 TS M0 |
| Microsoft Windows 2000 Professional | 8.2 TS2M0 | 9 TS M0 |
| Microsoft Windows 2000 Datacenter Server | 8.2 TS2M0 | 9 TS M0 |
| Microsoft Windows 2000 Advanced Server | 8.2 TS2M0 | 9 TS M0 |
| OpenVMS VAX | 8.2 TS2M0 | |
| Solaris | 8.2 TS2M0 | |
| 64-bit Enabled Solaris | 8.2 TS2M0 | |
| OS/2 | 8.2 TS2M0 | |
| IRIX | 8.2 TS2M0 | |
| Linux | 8.2 TS2M0 | 9 TS M0 |
| z/OS | 8.2 TS2M0 | 9 TS M0 |
| HP-UX | 8.2 TS2M0 | |
| ABI+ for Intel Architecture | 8.2 TS2M0 | |
| 64-bit Enabled HP-UX | 8.2 TS2M0 | |
| 64-bit Enabled AIX | 8.2 TS2M0 | 9 TS M0 |
| CMS | 8.2 TS2M0 | |
| OpenVMS Alpha | 8.2 TS2M0 | 9 TS M0 |
| AIX | 8.2 TS2M0 | 9 TS M0 |
| Tru64 UNIX | 8.2 TS2M0 | 9 TS M0 |
*
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: | SAS Reference ==> Procedures ==> SQL SAS Reference ==> SQL
|
| Date Modified: | 2003-06-20 15:25:32 |
| Date Created: | 2002-03-29 12:59:09 |