title: How to use Like operator to match a string in one table to a sub-string into another table
body: <p>I have to two tables <code>Table 1</code> &amp; <code>Table 2</code>. <code>Table 1</code> has customer details and <code>Table 2</code> has transaction details:</p>
  
  <pre><code>    Table 1                      Table 2        
  
  Col1    CustCode        Col1    TrainsactionID      Col3
  11      AAA             101     2139812/BBB/98waw   EDF
  22      BBB             102     2398472/CCC/18sdf   QWD
  33      CCC             103     9283743/AAA/76afa   VFB
  44      DDD             104     2983472/BBB/123as   FGV
  </code></pre>
  
  <p>I need to select the customer codes (strings) <code>AAA</code>, <code>BBB</code> and <code>CCC</code> from column <code>"CustCode"</code> of <code>table 1</code> as they exist as a substring in column <code>"TransactionID"</code> of <code>table 2</code>.
  Is there a way I can write a correlated subquery using <code>'Like %'</code> operator to fetch all such matching <code>CustCodes</code>?</p>