BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Good Morning,
I'm trying to take multiple tables from a sql and data procedure, which results in 3 tables, and use only the columns I want.
The data the gives me the tables are

proc sql;
create table mpuep09.pop as
select strata, count(*) as count, sum(amt_paid) as amount
from mpuep09.mpuep09_agg10
group by 1;
quit;

data mpuep09.samp; retain strata paid paid2; set mpuep09.mpuep09_samp; paid2 = paid; run;

%srs_extrap(mpuep09.samp,mpuep09.pop,method=100000,estimate=audited);

Does anybody have any insight?
Thank you!
2 REPLIES 2
Flip
Fluorite | Level 6
Could you be more specific?

I have read this several times and have no idea what it is ou are asking.
deleted_user
Not applicable
Firstly in the future and for the sanity of yourself and anyone else who may have to read your code, have only one semi-colon per line. It makes it so much easier to read. i.e.

data mpuep09.samp;
retain strata paid paid2;
set mpuep09.mpuep09_samp;
paid2 = paid;
run;

In the most simple example to get only the columns you want you would simply do:

data data_i_am_interested_in(keep=column1 column2 etc);
set table1 table2 table3;
run;

But I suspect you are after something a little more complicated. Can you give us example of the data in each of the tables. Do you want to do a merge or an append?

Cheers
Peter

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 2 replies
  • 658 views
  • 0 likes
  • 2 in conversation