Hello, I would like to make create a table using a proc sql but selecting different library based on the type of environment (DEV for development or PROD for production) . For exemple, if TypeEnv eq DEV , I would like to select the symy library and if TypeEnv eq PROD, I would like to select the 12symu library I have tried this code and it is not working %let typeEnv=DEV; *%let typeEnv=PROD; %macro Transfert; /*tranferts par agents ATO (Agents au Traitement des Opportunités);*/ proc sql; create table transfert as select table1.quand, table1.cdnname, table1.callsanswered as transferts, table1.callsoffered, table1.callsabandoned, table1.callsterminated, table2.sannee, table2.smois, table2.trimestre, table2.semaine %if typeEnv eq DEV %then %do; FROM symu.icdnstat as table1 left join commun.dates as table2 ON table1.quand = table2.date; %end; %else %do; FROM l2symu.icdnstat as table1 left join commun.dates as table2 ON table1.quand = table2.date; %end; QUIT; %mend Transfert; %Transfert; Does any one have already found a solution for this situation? Regards,
... View more