Quoted SQL IN-statement in SAS

Below is code that produces a quoted string from a column in a dataset. This can be used in an IN-statement in SQL.

proc sql;
      select      quote(Compress(name)) into :SQLMetaSrc separated by ','
      from datasets
      ;
quit;

Leave a Reply

Your email address will not be published. Required fields are marked *