WOW! I had forgotten the power and beauty of Call Execute! Only 3 or 4 lines of code... All driven by the contents of the Location table. data _null_; set location; call execute( 'Proc Sql; Create Table Sum_'||translate( trim( Location_Name ), '_', ' ' )|| ' as Select column1, Sum( column2 ) as Scolumn2 From '||SAS_Name||' Group By Column1; Quit;' ); run;
... View more