Friday, December 31, 2010

SAS 1001 Tips - Tip 5 - How can I store aggregate value as a macro parameter value

proc sql noprint;
select max(AvgIncome)
into :maxIncome
from sql.statedata
where state = ’New Jersey’;
reset print;
title "The Highest Average Income in among counties in NJ: &maxIncome";
select County, AvgHigh format 4.1
from sql.AvgIncome
where state = ’New Jersey’;

/* improvisation from SAS.com notes */

No comments: