title: SAS SQL: WHERE LIKE 'list of words'
body: <p>I've a dataset that has some comments that would exclude subjects. I want to make a mini dataset to collect these subjects.</p>
  
  <p>I'm trying to use SAS SQL for this so I tried to do this:</p>
  
  <pre><code>  PROC SQL;
           CREATE TABLE EXCLUDE as
           SELECT *
           FROM data_set
           WHERE UPCASE(COMMENT) like '%(INELIGIBLE | REFUSED)%';
   QUIT;
  </code></pre>
  
  <p>I also tried </p>
  
  <pre><code> PROC SQL;
      CREATE TABLE exclude as
      SELECT *
       FROM Data_set
          WHERE UPCASE(COMMENT) like ('%INELIGIBLE%'|'%REFUSED%')
      ;
   QUIT;
  </code></pre>
  
  <p>I keep getting an error that says 'LIKE OPERATOR Requires character operands'</p>
  
  <p>How can I make this a proper syntax query?</p>
  
  <p>Thanks</p>