Desktop productivity for business analysts and programmers

How to write this proc to a table

Accepted Solution Solved
Reply
Contributor
Posts: 41
Accepted Solution

How to write this proc to a table

proc sql;
   title 'Updated MLPs';
   select * from WORK.IDENTIFY_INACTIVE_MLP_YESTERDAY
   except    
   select * from WORK.MLP_RECORDS_2_ADD_UPDATE;
  

Need the results to create a table?!

 


Accepted Solutions
Solution
‎12-09-2015 05:07 PM
Super Contributor
Posts: 490

Re: How to write this proc to a table

proc sql;
CREATE TABLE except AS

select * from WORK.IDENTIFY_INACTIVE_MLP_YESTERDAY
except    
select * from WORK.MLP_RECORDS_2_ADD_UPDATE;
  

View solution in original post


All Replies
Grand Advisor
Posts: 17,325

Re: How to write this proc to a table

Then tell it to create a table Smiley Wink

 

proc sql;
   title 'Updated MLPs';

create table want as select * from (
   select * from WORK.IDENTIFY_INACTIVE_MLP_YESTERDAY
   except    
   select * from WORK.MLP_RECORDS_2_ADD_UPDATE);

Solution
‎12-09-2015 05:07 PM
Super Contributor
Posts: 490

Re: How to write this proc to a table

proc sql;
CREATE TABLE except AS

select * from WORK.IDENTIFY_INACTIVE_MLP_YESTERDAY
except    
select * from WORK.MLP_RECORDS_2_ADD_UPDATE;
  

Esteemed Advisor
Esteemed Advisor
Posts: 7,203

Re: How to write this proc to a table

Please note, the title is not needed as there is no printed output with create table, and please finish code blocks:

proc sql;
   create table WANT as
   select * from WORK.IDENTIFY_INACTIVE_MLP_YESTERDAY
   except    
   select * from WORK.MLP_RECORDS_2_ADD_UPDATE;
quit;
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 302 views
  • 0 likes
  • 4 in conversation