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-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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