Help using Base SAS procedures

SQL Tables from sql/data procedures

Reply
N/A
Posts: 0

SQL Tables from sql/data procedures

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!
Super Contributor
Posts: 359

Re: SQL Tables from sql/data procedures

Posted in reply to deleted_user
Could you be more specific?

I have read this several times and have no idea what it is ou are asking.
N/A
Posts: 0

Re: SQL Tables from sql/data procedures

Posted in reply to deleted_user
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
Ask a Question
Discussion stats
  • 2 replies
  • 98 views
  • 0 likes
  • 2 in conversation