Good day all,
I have a SQL loop that is producing 10 tabs of data, one for each year I run for my loop. In a second step, I am UNIONing the data into a singular data set. While I want the data sets to populate the SAS library I've designated, I do not want those 10 data sets to show up in the output tab. What's the easiest way to suppress them, in a sql statement, from the "Output Data" tab?
Thanks.
Wrap it in a CREATE TABLE statement then, or use NOPRINT. However, if you don't have a CREATE TABLE statement the results aren't stored anywhere.
proc sql;
create table want as
select * from
(select....
union
select ...
union
select ..
);
quit;
@eer_seer wrote:
Good day all,
I have a SQL loop that is producing 10 tabs of data, one for each year I run for my loop. In a second step, I am UNIONing the data into a singular data set. While I want the data sets to populate the SAS library I've designated, I do not want those 10 data sets to show up in the output tab. What's the easiest way to suppress them, in a sql statement, from the "Output Data" tab?
Thanks.
Post your code so that we can show how to change it.
The only way I know to suppress all tables appearing on the Enterprise Guide Output tab (I'm assuming that is what you are referring to) but still produce the tables is to change the limit of the number of datasets to output from the default 50 to 0 in the EG data settings.
As @Reeza suggested, the way to prevent the tables from showing is to not create the tables in the first place. They can be created implicitly in a query, and concatenated with UNION ALL.
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!
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.