Hi, I created a macro variable using proc sql ....select into.... The macro variable is for example: %put &top10.; run; '04050606', '94958693', '20494585'.... I want to rename a variable of a dataset with the first element of list macro variable that is a numeric code. I used this: proc sql noprint; create table prova_new as select drg_new, _c2_ as '%scan('&top10.',1,',')'n from prova; quit; but it doesn't work: ERROR 22-322: Expecting a name. Thank you!
... View more