- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 03-16-2009 09:58 AM
(1177 views)
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!
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Could you be more specific?
I have read this several times and have no idea what it is ou are asking.
I have read this several times and have no idea what it is ou are asking.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
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