Usage Note 32646: An error might occur if you use multiple instances of INNER JOIN syntax in the SQL procedure
The following error might occur if you use multiple instances of INNER JOIN syntax and you reference a table column in the ON clause before that table is referenced by the INNER JOIN:
ERROR: Correlated reference to column COL1 is not contained within a subquery.
This error is produced by an SQL procedure similar to the following:
proc sql;
select * from table1
inner join table2
on table3.col1 = table1.col1
inner join table3
on table2.col1 = table1.col1 ;
quit;
Note that the first ON clause contains a reference to TABLE3 before it is introduced as a table to be used in the query. To avoid this problem, be sure to reference the table prior to the INNER JOIN clause.
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.1 TS1M3 SP3 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M3 SP3 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M3 SP3 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M3 SP3 | |
Microsoft Windows XP 64-bit Edition | 9.1 TS1M3 SP3 | |
Microsoft® Windows® for x64 | 9.1 TS1M3 SP3 | |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M3 SP3 | |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M3 SP3 | |
Microsoft Windows 2000 Server | 9.1 TS1M3 SP3 | |
Microsoft Windows 2000 Professional | 9.1 TS1M3 SP3 | |
Microsoft Windows NT Workstation | 9.1 TS1M3 SP3 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 SP3 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 SP3 | |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 SP3 | |
Microsoft Windows XP Professional | 9.1 TS1M3 SP3 | |
Windows Vista | 9.1 TS1M3 SP3 | |
64-bit Enabled AIX | 9.1 TS1M3 SP3 | |
64-bit Enabled HP-UX | 9.1 TS1M3 SP3 | |
64-bit Enabled Solaris | 9.1 TS1M3 SP3 | |
HP-UX IPF | 9.1 TS1M3 SP3 | |
Linux | 9.1 TS1M3 SP3 | |
Linux on Itanium | 9.1 TS1M3 SP3 | |
OpenVMS Alpha | 9.1 TS1M3 SP3 | |
Tru64 UNIX | 9.1 TS1M3 SP3 | |
*
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.
Date Modified: | 2008-07-23 10:15:00 |
Date Created: | 2008-07-09 14:29:46 |