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.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.