BookmarkSubscribeRSS Feed
GPatel
Pyrite | Level 9
Code below gives me table information except for number of physical observations for all the tables in Justice Oracle library.

How can I get list of library name, member name and no. of records in each table?


LIBNAME justice ORACLE
PATH=Total.world
SCHEMA=usa
USER=xxxxx
PASSWORD="xxxxxxx"
READBUFF=1
;

Proc Sql ;
create table test1 as
select libname, memname, nobs
from dictionary.tables
where libname='JUSTICE' ;
quit ;
1 REPLY 1
SASJedi
SAS Super FREQ
You will probably need to get this with explicit pass-through SQL. Something like this ought to do it:
proc sql;
connect to oracle (path=Total.world user=xxxx password=xxxx);
select * from connection to oracle
(SELECT owner, table_name, num_rows
FROM ALL_TABLES
WHERE OWNER='USA' )
;
disconnect from oracle;
quit;
Check out my Jedi SAS Tricks for SAS Users

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 1893 views
  • 0 likes
  • 2 in conversation