Date: Fri, 4 Nov 2005 11:42:35 -0800
Reply-To: Friar Broccoli <EliasRK@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Friar Broccoli <EliasRK@GMAIL.COM>
Organization: http://groups.google.com
Subject: Re: Finding Table names in an Access *.mdb file
In-Reply-To: <8AD8F86B3312F24CB432CEDDA71889F21D60AA@ex06.GHCMASTER.GHC.ORG>
Content-Type: text/plain; charset="iso-8859-1"
Thanks guys;
Your code worked like a charm. Me happy :-)
"Pardee, Roy" wrote:
> 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 --------
|