Hello,
I think you should have posted your topic in the following discussion forum:
SAS Macro Facility, Data Step and SAS Language Elements
To create a macro-variable from the result of a SQL query, you have to use the following proc sql:
proc sql;
select Profit
into :Profit /* You can give the name you want but have to make sure */
from MyTable /* that your SQL query will only return 1 value. */
where Month = 'Feb';
quit;
Have a look to the following link in order to get more details about the possibilities you have to generate macro-variables with PROC SQL:
http://support.sas.com/documentation/cdl/en/sqlproc/62086/HTML/default/a001360983.htm
Regards,
Florent