Work.Employee
fna me age
Bruce 30
Dan 40
Work.Salary
fname salary
Bruce 25000
Bruce 35000
Dan 25000
The following merged SAS data set is generated:
Work.Empdata
fname age totsal
Bruce 30 60000
Dan 40 25000
Which one of the following SAS programs created the merged data set?
b. data work.empdata(drop=salary);
merge work.employee
work.salary;
by fname;
if first.fname then totsal=0;
totsal+salary;
if last.fname then output;
run;
c. data work.empdata;
merge work.employee
work.salary(drop=salary);
by fname;
if first.fname then total=0;
totsal+salary;
if last.fname then output;
run;
为什么B对?我认为C对啊?drop这里到底应该写在哪里呢?



雷达卡



京公网安备 11010802022788号







