In Base SAS® software, an SQLPLAN error might occur when you run an SQL procedure query when the following conditions exist:
- Two or more new variables are created within an inline view
- At least one of the newly created variables is used outside the inline view as part of a WHERE clause
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.