SAS Support Site Home | Samples and SAS Notes Home
SAS Notes V6-SQL-D102
SQLPLAN INTERNAL error when performing an INNER JOIN


You may receive a SQLPLAN INTERNAL error when your PROC SQL query performs an INNER JOIN of more than two tables. For example:

       select * from table1 inner join table2                                   
           on table1.col1=table2.col1 and table1.col2=table2.col2               
         inner join table3                                                      
           on table2.col1=table3.col1 and table2.col2=table3.col2               
         inner join table4                                                      
           on table3.col1=table4.col1 and table3.col2=table4.col2               
         where col1 in ('str1', 'str2', 'str3', 'str4');                        

The error received is:

    ERROR: sqlplan internal error: Cannot find symbol VARNAME, var=1,           
     tag=4.  This message can be caused by attempting to make correlated        
     references between two different items on a single FROM clause.            

The problem began in the following release levels: Release 6.08 TS420, Release 6.09 TS042, Release 6.09E TS450, Release 6.11 TS020 and Release 6.12 TS020. The problem has been corrected for Releases 6.09, 6.11 and 6.12 in maintenance Release 6.12 TS045. The problem has been corrected for Releases 6.08 and 6.09E in Release 6.09 TS460.


Products: BASE
Component: SQL
Priority: HIGH
Status: Outstanding Problem
Date: Wed, 26 Nov 1997

System Release Reported Release Fixed
VM/ESA (CMS) 6.08 TS420 6.09 TS460  
OS/390 (MVS) 6.08 TS420 6.09 TS460  
OpenVMS VAX 6.08 TS420 6.09 TS460  
VSE/ESA (VSE) 6.08 TS420  
VM/ESA (CMS) 6.09 TS450 6.09 TS460  
OS/390 (MVS) 6.09 TS450 6.09 TS460  
OpenVMS VAX 6.09 TS450 6.09 TS460  
AIX/6000 6.11 TS020 6.12 TS045  
HP-UX Operating Systems 6.11 TS020 6.12 TS045  
IBM OS/2 6.11 TS020 6.12 TS045  
Solaris 6.11 TS020 6.12 TS045  
Windows 3.11 6.11 TS020 6.12 TS045  
Intel ABI 6.11 TS040  
Silicon Graphics Unix 6.11 TS040  
Compaq Tru64 Unix 6.11 TS040  
Windows NT 6.11 TS040 6.12 TS045  
Windows 95 6.11 TS040 6.12 TS045  
AIX/6000 6.12 TS020 6.12 TS045  
HP-UX Operating Systems 6.12 TS020 6.12 TS045  
IBM OS/2 6.12 TS020 6.12 TS045  
Solaris 6.12 TS020 6.12 TS045  
OpenVMS Alpha 6.12 TS020 6.12 TS045  
Windows 3.11 6.12 TS020 6.12 TS045  
Windows NT 6.12 TS020 6.12 TS045  
Windows 95 6.12 TS020 6.12 TS045  
Compaq Tru64 Unix 6.12 TS040  
Macintosh 6.12 TS040  
AIX/6000 6.09 TS042 6.12 TS045  
HP-UX Operating Systems 6.09 TS042 6.12 TS045  
Solaris 6.09 TS042 6.12 TS045  
OpenVMS Alpha 6.09 TS044 6.12 TS045  

No Fixes Available