An SQLPLAN error might occur when two or more variables are created in an inline view


In Base SAS® software, an SQLPLAN error might occur when you run an SQL procedure query when the following conditions exist:

The error might look similar to the following:

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

The only workaround is to break up the query into multiple steps.