I do not think you can use a SQL subselect for the IN operator there.
The ERROR message should look like this:
ERROR: Syntax error detected on line 2 at column 10. Found SELECT, expecting a quoted string, a numeric constant, a datetime
constant, a missing value, -.
which means you must supply a list of literals.
Use PROC SQL to store the results into a macro variable for use in the WHERE, like
proc sql noprint;
select distinct quote(trim(id),"'") into :id_list separated by ","
from triangle;
quit;
and then do
table.deleterows /
table={name="TEST" caslib="mine" where="ID in (&id_list.)"};
Disclaimer: I have yet to start with Viya/CAS, but from a few quick tries I arrived at this suggestion. Have no idea if it works.
... View more