Dear experts, I want to use some %let variables in the following program but it is not working. The where statement seems to be ok but the name of the table that I want to create in not. And If I create a variable like X=&Initial_Year; I get a column with the result spread. Thank You for your help. %let initial_date='01Feb2021'; %let final_date='28Feb2021'; %let Initial_Year=year(&data_inicial.d); %let final_Year=year(&data_final.d); %let initial_month=month(&data_inicial.d); %let final_month=month(&data_final.d); data vendas_&Initial_Year._&&initial_month._&&final_Year._&& final_month.; set dataw.f_Sales; where ((data>=&dinitial_date.d and data<&inal_date.d) AND (TIPOLIN = 'V') AND (substr(id,1,1) in ('2','3','4','5','6','7','8','9'))); run;
... View more