title: SQL query to check `like '%' array of strings '%' ` supplied from another result set.
body: <p>I have two tables: t1 and t2. There are three steps: in t1 select a Set_of_strings with id = 1 ("1a" and"3c"). From t1 select strings that correspond to OPTIONID ='A' and that contain sub string from the Set_of_strings.</p>
  
  <p>t1   </p>
  
  <pre><code>ID  NAME   
  1   "1a"   
  2   "2b"   
  1   "3c"   
  </code></pre>
  
  <p>t2   </p>
  
  <pre><code>OPTIONID    TXT   
    A     "7h 9t"   
    B     "1a 8n"   
    A     "2b 4r"    
    A     "3c 6u" 
  </code></pre>
  
  <hr>
  
  <pre><code>SELECT 
      NAME 
  FROM t1 
  WHERE ID = 1; -- 1a, 3c
  
  SELECT
      TXT 
  FROM t2 
  WHERE OPTIONID = 'A' AND (TXT LIKE '%1a%' OR TXT LIKE '%3c%') --"3c 6u"
  </code></pre>
  
  <p>How to automate <code>TXT LIKE '%1a%' OR TXT LIKE '%3c%'</code> part?</p>
  
  <hr>
  
  <p><code>LIKE'%1a%'</code> is safe because of all entries have the same format, e.i. there is no <code>1a2</code> in <code>TXT</code> column.</p>