SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 62752: Incorrect results are generated when you use multiple views with the SQL procedure

DetailsCodeHotfixAboutRate It

When you use PROC SQL to join multiple database management system (DBMS) tables that use the same libref, incorrect results occur. This issue occurs when all of the following are true:  

  • You create a view that references a DBMS table.
  • You create a second view in which the following is true:
    • The first view is referenced.
    • Two new variables are created through two different summary functions.
    • The GROUP BY clause includes all the variables in the SELECT clause that are not part of a summary function.
  • You create a third view that references the first view.
  • You create a fourth view in which the following is true:
    • View2 and view3 are joined.
    • A CASE expression is used to create a new variable.
    • One of the variables created by use of the summary function in the second view is renamed.
  • You create a table in which the following is true:
    • The fourth view is referenced.
    • A summary function is included in the SELECT clause.
    • The GROUP BY clause contains the variables that was created by a summary function in view2 and renamed in view4 and the variable created by the case expression in view4.

Click the Full Code tab to see example code that causes this issue to occur.

Click 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 SystemBase SASSolaris for x649.3_M29.4_M69.3 TS1M29.4 TS1M6
Linux for x649.3_M29.4_M69.3 TS1M29.4 TS1M6
Linux9.3_M29.4_M69.3 TS1M29.4 TS1M6
64-bit Enabled AIX9.3_M29.4_M69.3 TS1M29.4 TS1M6
Windows Vista for x649.3_M29.3 TS1M2
Windows Vista9.3_M29.3 TS1M2
Windows 7 Ultimate x649.3_M29.4_M69.3 TS1M29.4 TS1M6
Windows 7 Ultimate 32 bit9.3_M29.4_M69.3 TS1M29.4 TS1M6
Windows 7 Professional x649.3_M29.4_M69.3 TS1M29.4 TS1M6
Windows 7 Professional 32 bit9.3_M29.4_M69.3 TS1M29.4 TS1M6
Microsoft Windows 8.1 Enterprise x649.3_M29.4_M69.3 TS1M29.4 TS1M6
Microsoft Windows 8.1 Enterprise 32-bit9.3_M29.4_M69.3 TS1M29.4 TS1M6
Microsoft Windows 8 Pro x649.3_M29.4_M69.3 TS1M29.4 TS1M6
Microsoft Windows 8 Pro 32-bit9.3_M29.4_M69.3 TS1M29.4 TS1M6
Microsoft Windows 8 Enterprise x649.3_M29.4_M69.3 TS1M29.4 TS1M6
Microsoft Windows 8 Enterprise 32-bit9.3_M29.4_M69.3 TS1M29.4 TS1M6
Microsoft® Windows® for x649.3_M29.4_M69.3 TS1M29.4 TS1M6
z/OS 64-bit9.3_M29.4_M69.3 TS1M29.4 TS1M6
HP-UX IPF9.3_M29.4_M69.3 TS1M29.4 TS1M6
64-bit Enabled Solaris9.3_M29.4_M69.3 TS1M29.4 TS1M6
64-bit Enabled HP-UX9.3_M29.4_M69.3 TS1M29.4 TS1M6
Windows 7 Home Premium x649.3_M29.4_M69.3 TS1M29.4 TS1M6
Windows 7 Home Premium 32 bit9.3_M29.4_M69.3 TS1M29.4 TS1M6
Windows 7 Enterprise x649.3_M29.4_M69.3 TS1M29.4 TS1M6
Windows 7 Enterprise 32 bit9.3_M29.4_M69.3 TS1M29.4 TS1M6
Microsoft Windows XP Professional9.3_M29.3 TS1M2
Microsoft Windows Server 2012 Std9.3_M29.4_M69.3 TS1M29.4 TS1M6
Microsoft Windows Server 2012 R2 Std9.3_M29.4_M69.3 TS1M29.4 TS1M6
Microsoft Windows Server 2012 R2 Datacenter9.3_M29.4_M69.3 TS1M29.4 TS1M6
Microsoft Windows Server 2012 Datacenter9.3_M29.4_M69.3 TS1M29.4 TS1M6
Microsoft Windows Server 2008 for x649.3_M29.3 TS1M2
Microsoft Windows Server 2008 R29.3_M29.3 TS1M2
Microsoft Windows Server 20089.3_M29.3 TS1M2
Microsoft Windows Server 2003 for x649.3_M29.3 TS1M2
Microsoft Windows Server 2003 Standard Edition9.3_M29.3 TS1M2
Microsoft Windows Server 2003 Enterprise Edition9.3_M29.3 TS1M2
Microsoft Windows Server 2003 Datacenter Edition9.3_M29.3 TS1M2
Microsoft Windows 8.1 Pro x649.3_M29.4_M69.3 TS1M29.4 TS1M6
Microsoft Windows 8.1 Pro 32-bit9.3_M29.4_M69.3 TS1M29.4 TS1M6
z/OS9.3_M29.4_M69.3 TS1M29.4 TS1M6
* 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.