title: Dynamic 'LIKE' Statement in SQL (Oracle)
body: <p>I am trying to select from a table with the following structure :</p>
  
  <pre><code>MATERIALS 
  id
  shortname 
  longname
  </code></pre>
  
  <p>all the lines where the long name is like the short name.</p>
  
  <p>I've tried the solution presented here : <a href="https://stackoverflow.com/questions/4612282/dynamic-like-statement-in-sql">Dynamic Like Statement in SQL</a>
  , but it doesn't work for me.</p>
  
  <pre><code>SELECT * from MATERIALS where longname like (shortname + '%');
  </code></pre>
  
  <p>doesn't work in Oracle.</p>