There are several ways to import Microsoft Access tables into SAS. They are as follows:
1) Using SAS/ACCESS to ODBC:
1) SAS/CORE, SAS/BASE and SAS/ACCESS interface to ODBC licensed and installed at your site.
2) The Microsoft Access ODBC driver must be installed and configured on your PC.
3) Use the following code to read the Microsoft Access file into a SAS dataset. Libname sasuser ‘c:\foo’;
Proc SQL;
Connect to ODBC (prompt);
Create table sasuser.TEST
As select * from connection to ODBC
(select * from tablename);
disconnect from odbc;
quit;
- ‘Prompt’will activate a pop-up window where you can choose your data source name. Alternatively, you can use ‘DSN=’in the parenthesis and specify your data source name.
- ‘sasuser.TEST’ is the name of the SAS dataset you will create from this query.
- ‘tablename’must be the specific unit of data that we are reading.
For Microsoft Access the DSN references the database(.MDB file), and the ‘tablename’refers to the table in the database.
Download pdf Importing Microsoft Access tables to SAS Datasets
Related Searches: microsoft access odbc, access odbc driver, data source name, sas datasets, sas dataset
RSS feed for comments on this post · TrackBack URI
Leave a reply