I have a SAS macro below that is not working--- this snippet returns no values because the where statement doesn\'t work. Anyone have any ideas? I tried adding %str but that
Macro variables will not resolve in single quotes. You are also missing the FROM clause, and the macro parameter was being provided as positional (instead of name=value pair). Try the following:
%macro refreshments(beverage_type=);
proc sql;
select *
from YOURTABLE
where drink_type = "&beverage_type";
%mend;
%refreshments(beverage_type=Sprite);