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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1111 views
  • 0 likes
  • 2 in conversation