SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Tom
Super User Tom
Super User

You can query metadata from some systems to get record counts, but that does not work for all.  For example for VIEWs.

That is why the code I posted included this statement.

  where missing(table_cnt);
Ivan555
Quartz | Level 8

@Patrick 

 

About:

If you have to care about performance then don't issue a select count(*) against SAS tables as there the row count is a table attribute (nlobs) which you can retrieve directly from the descriptor (metadata) part of the table.

 

I have missing values in all descritor parts..

 

Previosly you wrote:

Tables from libraries that point to databases will have a missing value for the row count because that's not a table attribute of database tables (like it is for SAS tables).

I think that is my case, so I have to calculate metadata for several libraries consisting of ~500 tables manually.. but this will be another topic I think.

I think during September I will write a code being based on your and Tom's solution.

I also think I will post it for information and will make a link on this discussion.

 

One more time:  Big THX for Everyone, I am closing the topic.

sas-innovate-white.png

Join us for our biggest event of the year!

Four days of inspiring keynotes, product reveals, hands-on learning opportunities, deep-dive demos, and peer-led breakouts. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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
  • 16 replies
  • 2778 views
  • 10 likes
  • 4 in conversation