I have a work table named WORK.WEEK_YEAR_FESTIVITA with two records with dates 08dec2022 and 09dec2022 in the field "HolidayDate" and I would to convert this list in a macro variable like "Elenco_Date = '08dec2022'd,'09dec2022'd" and so on for other possible dates in the table WORK.WEEK_YEAR_FESTIVITA. I tried with this proc SQL:
proc sql noprint; select distinct HolidayDate into : Elenco_Date separated by "'d," from WORK.WEEK_YEAR_FESTIVITA; quit;
%put &Elenco_Date;
but the result IS:
ELENCO_DATE = 08DEC2022'd,09DEC2022;
and not
ELENCO_DATE = '08DEC2022'd,'09DEC2022'd;
as desired
Do you have suggestions?
Thanks