10-03-2012 11:02 AM
I have a stored process (SP) which contains the following proc sql
WHERE NAME NOT IN (&cond);
&cond is dynamically determined by the calling SP and passed
through the URL :
SASStoredProcess/do?_program=/BIP Tree/ReportStudio/StoredProcesses/my_sp&cond="NAME1" "NAME2"
The above sql procedure is not executed because of a syntax error
ERROR 22-322: Syntax error, expecting one of the following: a quoted string, a numeric constant, a datetime constant, a missing value, -.
However the log indicates that the macrovariable cond generates "NAME1" "NAME2" as wished.
Moreover, when I copy/paste the resolved proc sql displayed in the log in SAS and execute it, it works.
SELECT NAME FROM a.TABLE WHERE NAME NOT IN ("NAME1" "NAME2");
How can I get this proc to work ?