Tuesday, November 30, 2010

Proc SQL Feedback Option

The Feedback option in Proc SQL, puts the expanded or Transformed verion of the query to the log window, this can be quiet handy and can be compared to the Macro debugging options.

Here is an example :
Program:
proc sql feedback;
select * from temp
group by post having count( distinct code ) ge 2 ;
quit;

Here is the log:
proc sql feedback;
16 select * from temp
17 group by post having count( distinct code ) ge 2 ;
NOTE: Statement transforms to:
select TEMP.post, TEMP.code
from WORK.TEMP
group by TEMP.post
having COUNT(distinct TEMP.code) >= 2;

No comments:

Post a Comment