Turns out you can put a DROP on a PROC SQL CREATE TABLE. I'm not sure why I would want to do so vs. just leaving it off the SELECT, but maybe some day. Anyway, here's how:
Source:
data work.grandkids;
input name $ gender $ age;
datalines;
Kamina F 7
Raelani F 5
Elliott M 2
Callie F 0
;
run;
proc sql noprint;
create table work.females(drop=gender) as
select name, gender, age
from work.grandkids
where gender = "F";
quit;
run;
title "Granddaughters";
proc print data=Work.Females;
run;
title;
Results:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment