I have a very basic question
I build a query in SAS-EG
so that it outputs var1, YEAR
and MONTH
values but
YEAR
and MONTH
values are prompt values(A
and B
respectively)
It works fine when I use SAS-EG GUI
but the code below does not work when I
copy paste it into a new program.
If you help me I would really appreciate.
Thanks
%_eg_conditional_dropds(want);
PROC SQL;
CREATE TABLE WORK.want AS
SELECT t1.YEAR,
t1.MONTH,
t1.var1,
FROM have t1
WHERE %_eg_WhereParam( t1.MONTH, A, EQ, TYPE=S, IS_EXPLICIT=0 ) AND %_eg_WhereParam( t1.YEAR, B, EQ, TYPE=S, IS_EXPLICIT=0 );
QUIT;
Assuming that when you "copy paste it to a new program" you are still in the EG UI, try the following.
Now when you run the program, you should get prompted for the Prompts.