Problem Note 19473: Certain query generates unexpected PROC SQL in SAS® Enterprise Guide®
A query that generates code similar to the following in SAS Enterprise
Guide 4.1.0.471 or 4.1.0.485 to join two tables with a WHERE clause that
has an OR operator:
create table work.ab as select a.id,
a.number,
a.age,
b.height
from work.a as a
inner join work.b as b on (a.id = b.id) and
(a.number = b.number)
where a.age >= 50 or b.height >= 170;
might generate code similar to the following in SAS Enterprise Guide
4.1.0.495 and might return unexpected results:
create table work.ab as select a.id,
a.number,
a.age,
b.height
from work.a as a,
work.b as b
where a.id = b.id and
a.number = b.number and
a.age >= 50 or b.height >= 170;
To circumvent the problem, create multiple queries, two to subset the
data with a WHERE clause and a third query to join the two resulting
tables.
Select the Hot Fix tab in this note to access the hot fix for this issue.
Operating System and Release Information
| SAS System | SAS Enterprise Guide | Microsoft Windows XP Professional | 4.1 | 4.2 | 9.1 TS1M3 SP1 | 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.
| Type: | Problem Note |
| Priority: | high |
| Date Modified: | 2007-03-14 19:46:36 |
| Date Created: | 2007-02-01 11:34:51 |