I'm currently getting this error:
NOTE: Invalid argument to function QUOTE. Missing values may be generated.
NOTE: PROCEDURE SQL used (Total process time):
NOTE: Line generated by the macro variable "EXLCL".
64 ,,
_
22
76
ERROR: Syntax error while parsing WHERE clause.
ERROR 22-322: Syntax error, expecting one of the following: a quoted string, a numeric constant, a datetime constant,
a missing value, -.
ERROR 76-322: Syntax error, statement will be ignored.
when I run this code:
proc summary data=test NWAY completetypes;
class job_class inj_yr;
var avg_emp;
output out=out1 (where=(inj_yr='2008' and avg_emp in(.,0))) sum= ;
run;
proc sql noprint;
select quote(job_class)
into: exlcl separated by ','
from out1;
quit;
%put &exlcl;
proc report data=test nowd
style(header)=[font_weight=bold];
options missing='0';
where job_class not in (&exlcl);
columns job_class year, (avg_emp);
The variable job_class is a categorical variable. Some of its categories are: Plant Equipment, Engineer, and Clerical Worker.
The file out1 appears to be generated correctly.
Any ideas?
Thanks,
Jason