proc sql;
select distinct e.firstname, e.lastname
from sasuser.flightschedule as a,
sasuser.staffmaster as b,
sasuser.payrollmaster as c,
sasuser.supervisors as d,
sasuser.staffmaster as e
where a.date=’04mar2000’d and
a.destination=’CPH’ and
a.empid=b.empid and
a.empid=c.empid and
d.jobcategory=substr(c.jobcode,1,2)
and d.state=b.state
and d.empid=e.empid;
quit;
我想知道的是为什么第二个表要再命名一次,如果我把这个去掉之后,并稍微修改一下,换成如下程序:
proc sql;
select distinct b.firstname, b.lastname
from sasuser.flightschedule as a,
sasuser.staffmaster as b,
sasuser.payrollmaster as c,
sasuser.supervisors as d
where a.date='04mar2000'd and
a.destination='CPH' and
a.empid=b.empid and
b.empid=c.empid and
d.jobcategory=substr(c.jobcode,1,2)
and b.state=d.state;
quit;
结果得到的数据跟第一个程序所得到的的结果不一样,请教一下这个为什么呢?



雷达卡





京公网安备 11010802022788号







