|
Yes--set a sas/access libname to the mdb & then query the table names
out of dictionary.tables w/proc sql. Like so:
libname mdb ODBC required = "DRIVER=Microsoft Access Driver
(*.mdb);DBQ=C:\Documents and Settings\pardre1\Desktop\MENUReporter.mdb"
;
proc sql ;
create table mdb_tables as
select memname
from dictionary.tables
where libname = 'MDB'
;
select memname from mdb_tables
;
quit ;
Note that that gets you msaccess' system tables too--to screen those
out, use this where clause:
where libname = 'MDB' AND
memname not like 'Msys%'
HTH,
-Roy
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Friar Broccoli
Sent: Friday, November 04, 2005 9:30 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Finding Table names in an Access *.mdb file
Hi all;
Before extracting data from an access *.mdb file, using macro code
like:
proc import table=&TableName out=MDB_SAS.&SasSetName
dbms=access replace;
database="&InFilePathAndName";
run;
is there some way WITHIN SAS of getting a list of the names of all the
tables in (or referenced by) the *.mdb file?
Thanks;
Friar Broccoli
Robert Keith Elias, Quebec, Canada Email: EliasRK (of) gmail * com
Best programmer's & all purpose text editor: http://www.semware.com
--------- I consider ALL arguments in support of my views --------
|