Thank you, After reading your answers, it turns out that my SQL ("SELECT ... WHERE DATE IN ( &date.)") needs $date. to be in these following formats : '31/03/2020' or '31-03-2020', which seem to be strings in SAS (but recognized as date by Oracle). My macro selects data from DB, processes them and exports an excel file. How can I execute this macro on several strings ? ('31/01/2020' '31/03/2020') Ex : %LET list_dates = '31/01/2020','31/03/2020';
%macro main(list_dates);
%do i=1 %to 2;
%macroSQL(%scan(&list_dates.,&i,','));
%end;
%mend; ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The condition was: '31/03/2020' ERROR: Argument 2 to macro function %SCAN is not a number. ERROR: The macro macroSQL will stop executing. does not seem to work %macroSQL('31/01/2020'); But this works
... View more