title: SQL Adding a Column to table, based on a inner join
body: <p>I have two firebird tables, T1 &amp; T2.</p>
  
  <pre><code>T1 columns: pid, ean, desc
  
  A T1 record: 1234, '102030', 'the desc'
  </code></pre>
  
  <p>and</p>
  
  <pre><code>T2 columns: eid, many_eans, eandesc 
  
  A T2 record: 4321, '634232;**102030**;273728', 'the ean desc'
  </code></pre>
  
  <p>I can with this select query get my results:</p>
  
  <pre><code>select  T1.pid
        , T1.ean
        , T1.desc
        , T2.eandesc
  
    from table1 as T1
  inner
    join table2 as T2 
      on T1.ean like '%' || T2.many_eans || '%'
  </code></pre>
  
  <p>But the query takes too long, therefore I want to add a Column to T1 something like compute by, that adds the T2.eandesc text to the T1 table where T1.ean like %T2.many_eans%</p>
  
  <p>After adding the column I would just do this query to get my data.</p>
  
  <pre><code>select pid, ean, desc, eandesc from T1
  </code></pre>
  
  <p>How do I add the T2.eandesc to T1 ?</p>