title: multiple comparisons in a single sql query
body: <p>I need to get the rows of address by comparing two columns in diffrent view</p>
  
  <p>one is a database of addresses</p>
  
  <pre><code>    CREATE TABLE IDData (
      id      INTEGER PRIMARY KEY AUTOINCREMENT,
      cgi     STRING,
      cellid  STRING,
      address STRING,
  );
  </code></pre>
  
  <p>there is another table,</p>
  
  <pre><code>CREATE TABLE cdata (
      id       INTEGER PRIMARY KEY AUTOINCREMENT,
     fcellid  TEXT,
  );
  
  IDData
  id  cgi            cellid      address
  1   123456789879   9879        512- baker street london
  2   {blank}        9462        23 panama beach
  3   456789879324   {blank}     Chandni chowk delhi
  
  cdata
  id    fcellid
  1     123456789879
  2     9462
  3     9324
  </code></pre>
  
  <p>result should be</p>
  
  <pre><code>fcellid        address
  123456789879   512- baker street london
  9462           23 panama beach
  9324           Chandni chowk delhi
  </code></pre>
  
  <p>now what i tried to is</p>
  
  <pre><code>SELECT fcellid,iii.address FROM cdata as dd left JOIN IDData as iii ON (iii.cgi like '%' || dd.fcellid or dd.fcellid like '%' || iii.cgi) or (iii.cellid like '%' || dd.fcellid or dd.fcellid like '%' || iii.cellid );
  </code></pre>
  
  <p>but not workin as expecting giving too much results as it is returning results from every condition, i want to get only the results for the number of fcellid in cdata.</p>