Hello, In the process of converting Access tables to SAS (9.4 TS Level 1m1 X64_SRV12), I read in a list of Access databases, followed by a list of all the tables in each database, and finally save each table in each database as a SAS file. This works great, except when the name of a table has consecutive spaces in it. Below is the piece of code giving me problems. /* DBNAMES is the filepath of the Access database Name is the table name within the database */ proc sql;
connect to access (path="&DBNAMES");
create table output.&title as
select * from connection to access
(
select * from `%superq(Name)`
);
disconnect from access;
quit; The following error is then given: ERROR: Describe: The Microsoft Access database engine cannot find the input table or query '02 - agent and emergency contact'. Make sure it exists and that its name is spelled correctly. In reality there is an extra space between "-" and "agent" that is sent to the Access database, but for some reason is gets removed in the process. The same error is given even if the actual name of the table ('02 - agent and emergency contact') is entered in place of `%superq(Name)`. I deduce that the space is removed, as even the method of using the actual table name with the consective spaces returns the error with only a single space in the table name that could not be found. Lastly, the reason this SQL Pass-Through is used, is beacuse it allows tables names of greater than 32 characters, which many of the tables in question contain. Is there any way around this without going into the Access table and manually removing the extra blanks? Thanks!
... View more