title: Pass substring of values inside Where clause conditions
body: <p>I have a requirement to pass substring of parameter values inside where clause statement</p>
  
  <p>Parameter Value is pmtr: CN</p>
  
  <p>Query: </p>
  
  <p>I want to filter CAN country from the below table using one column but my parameter value holds one 2 digits (CN) but I have to filter records for Canada country from database which holds 3 digits (CAN). I am trying to get the substring of 1st position of parameter value and then appends with hardcoded char 'A' then again take substring of second position of parameter value in below query.</p>
  
  <pre><code>Select a,b 
  from tab 
  where a='pmtr[1,1]':'A':'pmtr[2,1]'
  </code></pre>
  
  <p>Tried with substring function it didn't work giving no result. Is there any way to achieve in filter condition using sql?</p>