Solved

Finding out of a table has 0 records

Posted on 2014-04-29
2
291 Views
Last Modified: 2016-02-13
Experts,

I have a macro in SAS that is looping through a dataset and creating a table by extracting records from another dataset.

Is there a way to check to see while processing if the table  being created has no records?
0
Comment
Question by:morinia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 35

Assisted Solution

by:Bembi
Bembi earned 250 total points
ID: 40030790
Select Count (any field) as RecordCount from TableName ???
If RecordCount results to 0, the table is empty.
0
 
LVL 14

Accepted Solution

by:
Aloysius Low earned 250 total points
ID: 40031014
If you are asking about the table being created, then no, not until it has been created or you make a query using the same conditions first which would be a waste of time to execute the same conditions and even joins first..
If you are asking about the source table, then you could a count first described above..
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Your data is at risk. Probably more today that at any other time in history. There are simply more people with more access to the Web with bad intentions.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question