title: how to use like and substring in where clause in sql
body: <p>Hope one can help me and explain this query for me,
  why the first query return result but the second does not:</p>
  
  <p>EDIT:
  first query:</p>
  
  <pre><code>select name from Items where name like '%abc%'
  </code></pre>
  
  <p>second Query:</p>
  
  <pre><code> select name from Items where name like substring('''%abc%''',1,10)
  </code></pre>
  
  <p>why the first return result but the second return nothing while </p>
  
  <pre><code>substring('''%abc%''',1,10)='%abc%'
  </code></pre>
  
  <p>If there are a logic behind that, Is there another approach to do something like the second query,</p>
  
  <p>my porpuse is to transform a string like '''abc''' to 'abc' in order to use like statement,</p>