Date: Thu, 14 Apr 2005 14:07:44 -0400
Reply-To: Bob_Abelson@HGSI.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Bob Abelson <Bob_Abelson@HGSI.COM>
Subject: Re: get list of tables via Proc SQL ?
Content-Type: text/plain; charset=us-ascii
Hunter,
You should be able to do this (can't test since I don't have SQL Server):
proc sql;
select distinct memname
from dictionary.tables
where libname="XXX"; *note use of upper case;
quit;
Best of luck.
Bob Abelson
HGSI
240 314 4400 x1374
bob_abelson@hgsi.com
hunter <huntertaylor@SURFEU.FI>
Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
04/14/2005 01:57 PM
Please respond to hunter
To: SAS-L@LISTSERV.UGA.EDU
cc:
Subject: get list of tables via Proc SQL ?
if I know the name of the database on MS SQL Server but I don't know
the list of tables in that DB, is there a utility or lookup function in
Proc SQL that allows me to list the tables?
pseudocode:
libname xxx odbc
noprompt="driver={SQL Server};server=MYSERVER1;uid=xxUser;pwd=xxUser;
database=ThisDB;";
proc sql; select list of all tables in xxx;