Unexpected variable names from PROC SQL when using "SELECT COLUMN AS"syntax while accessing DBMS tables


Using SAS/ACCESS® Interface to a DBMS with the LIBNAME statement, an SQL query like the following can result in new SAS variable names having leading and trailing underscores:

LIBNAME DBMS ACCESS "c:\my documents\database1.mdb";

proc sql;
   create table test as
     select distinct s.emp_id as employee, s.lotsize as arealand
         from dbms.table s
           ;
  quit;

In the SAS data set WORK.TEST, the variable names appear as follows:

_employee_
_arealand_