Date: Fri, 4 Aug 2006 15:39:56 -0400
Reply-To: "Dorfman, Paul" <paul_dorfman@MERCK.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Dorfman, Paul" <paul_dorfman@MERCK.COM>
Subject: Re: how to display what tables are contained in a database in SAS
Content-Type: text/plain
Aihua,
In SAS terms, a data base is a SAS data library. If it is associated with
the libref Aihua, say, then
Proc contents data = aihua._all_ out = contents noprint ;
Run ;
Will throw all you need into the SAS data set CONTENTS, which I view then
view using the SAS viewer. Alternatively, you can do
Proc sql ;
create table contents as
select *
from dictionary.columns
where libname = 'AIHUA'
;
Quit ;
If it is an external data base like DB2 then the same will work, except that
the statements above will "display" the metadata pertaining to the
particular schema coded into the libname statement for the particular data
base SAS engine.
Kind regards
------------
Paul Dorfman
Jax, FL
------------
+-----Original Message-----
+From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On
+Behalf Of Ai Hua Wang
+Sent: Friday, August 04, 2006 2:05 PM
+To: SAS-L@LISTSERV.UGA.EDU
+Subject: how to display what tables are contained in a database in SAS
+
+
+Hi,
+
+I am working on a large database which contains a lot
+of tables. I would like to know how to get what tables
+(for instance, tables names) are within that database?
+I attempted to use Proc sql with the describe
+statement, but it does not allow me to describe the
+database.
+
+Thank you very much in advance.
+
+Aihua
+
+__________________________________________________
+Do You Yahoo!?
+Tired of spam? Yahoo! Mail has the best spam protection around
+http://mail.yahoo.com
+
+
------------------------------------------------------------------------------
Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as Banyu) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system.
------------------------------------------------------------------------------
|