SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 19473: Certain query generates unexpected PROC SQL in SAS® Enterprise Guide®

DetailsHotfixAboutRate It

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

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemSAS Enterprise GuideMicrosoft Windows XP Professional4.14.29.1 TS1M3 SP19.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.