BookmarkSubscribeRSS Feed
eer_seer
Obsidian | Level 7

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.

 

 

4 REPLIES 4
Reeza
Super User

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.

 

 



 

PGStats
Opal | Level 21

Post your code so that we can show how to change it.

PG
SASKiwi
PROC Star

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.

PGStats
Opal | Level 21

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.

PG

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 5066 views
  • 0 likes
  • 4 in conversation