How to solve the problem of using macro varible in Proc SQL / Execute(set ....where .... ) instead of a hardcode value. There is no problem if using a hardcode (='ABC').
If using sigle quote (='&macv'), no update happen and no erro in log; Double quote will cause error (Error Code: -207 Invalid column name 'ABC').
e.g.
%let macv=ABC
proc sql;
connect to sybase(user=username password=sybpass ...... );
execute (update sybase_table
set column1=1
where column6='&macv')
by sybase;
disconnect from sybase;
quit;
Thanks in advance. Merry X'mas!
If using sigle quote (='&macv'), no update happen and no erro in log; Double quote will cause error (Error Code: -207 Invalid column name 'ABC').
e.g.
%let macv=ABC
proc sql;
connect to sybase(user=username password=sybpass ...... );
execute (update sybase_table
set column1=1
where column6='&macv')
by sybase;
disconnect from sybase;
quit;
Thanks in advance. Merry X'mas!