12-05-2015 10:41 AM
12-05-2015 01:04 PM
12-05-2015 05:24 PM - edited 12-05-2015 05:26 PM
What @Reeza proposes works in my EG version (7.11) only if changing the table name via Options/Change Button as shown below.
If I just enter the name into the "Output name" field then it get's quoted as name literal and generates code like
CREATE TABLE WORK.'test&test'n AS
Only after the rename via "options" drop-down I'm getting the table name generated without quoting.
CREATE TABLE WORK.test&test AS
12-07-2015 03:34 PM
Do I have to set up a special condition under the Prompt Manager option or Tools>Options?
Do you think it might be due to the EG version that I have which is earlier than yours?
12-08-2015 06:56 AM
I've run first the following code for my test.
%let test=myTest; data test; set sashelp.class; run;
Then I've used the query builder as alredy posted.
If this doesn't work for you then I must assume it's caused by an earlier version of SAS EG.
12-08-2015 10:41 AM
12-08-2015 11:15 AM
I'm using version 5.1. Could that be the reason it does not work?
I will try calling Tech Support. Any other help on this is deeply appreciated.
12-08-2015 11:16 AM
The solution that @Patrick supplied is creative, but it's a bit of a trick that might be working by accident, and not by design.
As far as I know, there isn't an official method to substitute in a macro value for the output data name in the Query Builder. My suggested workaround would be:
- Create the query to output to a known, static name (ex: work.currentmonth).
- Link a subsequent program node that renames/copies that data set to the name you want, using the macro variable that you supply. You could do this with DATA step or PROC COPY or PROC DATASETS.