【sas proc sql】引用计算产生的列
在proc sql中引用计算产生的列,前面必须加上calculated
例如
1 proc sql outobs=5; 2 title 'this is an example of sql and outobs'; 3 select wangnei,date,'test','测试',wangnei+1 as wang,wangnei+10 as wanga,(calculated wang+calculated wanga) as wangb 4 from mysas.mmsone 5 where date<200905 6 order by wangnei desc; 7 quit;
注意,两个计算生成的变量前面都要加上calculated