LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (November 2005, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 4 Nov 2005 09:43:19 -0800
Reply-To:   "Pardee, Roy" <pardee.r@GHC.ORG>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Pardee, Roy" <pardee.r@GHC.ORG>
Subject:   Re: Finding Table names in an Access *.mdb file
Comments:   To: Friar Broccoli <EliasRK@GMAIL.COM>
Content-Type:   text/plain; charset="US-ASCII"

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 --------


Back to: Top of message | Previous page | Main SAS-L page