Well, you do have a FROM clause, but it is in the wrong place. Technically, it would be moved: select empname into : names separated by ',' from emp; But take a step back for a moment. Even if you created such a macro variable it wouldn't be useful later. You would get a list like: Amy,Peter,Fred What you really would need in order to utilize a macro variable later is a value like: "Amy", "Peter", "Fred" You could get SQL to produce that instead. But take another step back and you'll see that macro language is the wrong approach for this task. SQL lets you select matching records. My SQL might not be good enough, but there are enough SQL programmers on the board to correct this if necessary: proc sql; select * from all_emp where name in (select name from emp); quit; Good luck.
... View more