2012-09-04 56 views
0
ods html file = "Y:/cars/cars.xls"; 

proc sql; 
title "Cars"; 
select 
make,model,type,origin,drivetrain 
from sashelp.class 
where engine size gt 3; 
quit; 

假设在SAS上面的查询运行后,我将以excel格式获取输出。 那么,如何通过proc report步骤获得相同的输出呢?在proc报告中结合proc sql步骤在excel中创建报告

回答

0

由于sashelp.class中没有任何汽车,您不会得到太多的输出。

基本PROC报告步看起来像:

title "Cars"; 
proc report data=sashelp.cars nowd; 
where enginesize gt 3; 
columns make model type origin drivetrain; 
run; 

我不会用PROC REPORT虽然只是做到这一点 - PROC REPORT的一点是所有的可以使用的其他功能之间格式化选项,汇总选项等。