I am trying to use proc sql select into to create a variable that I then try to call later. This variable is the average price (BlockPrice).
proc sql;
create table Block_Price_Calc as
select mean(Price) Into : BlockPrice
from Data1
Where As_Of_Date >= '31MAR2015'd and As_Of_Date < '07APR2015'd;
quit;
%put &BlockPrice;
proc sql;
create table Want as
select *,
(&BlockPrice) as Block
from Data2;
quit;
The variable BlockPrice is not being recognized and it seems like it is being stored as a temporary variable. Any thoughts?