I have a variable (e.g., VARS) in Table_A that contains a list of variables to be selected from Table_B.
VARS
====
"Age"
"Gender"
"Height"
"Weight"
...
Table B contains variables as named above among many other variables. I would like to select only those variables in VARS from Table B. Here's a code I used:
proc sql;
select (select VARS from Table_A)
from Table_B;
run;
Of course, I got an error message: "ERROR: Subquery evaluated to more than one row."
Is there a way to achieve this in proc sql? I know how to do this by creating %macro variables.
Many thanks,
... View more