title: SQL add filter only if a variable is not null
body: <p>Hi I have query as follows:</p>
  
  <pre><code>    SELECT  route_id [ROUTE_ID]
      FROM route_master(NOLOCK)
      WHERE  route_ou = 2
      AND   route_query = @l_s_query
      AND   lang_id  = 1
  </code></pre>
  
  <p>Here, the " AND route_query = @l_s_query" condition in WHERE clause should be added only when @l_s_query is non empty. I donot want to write IF ELSE condition for @l_s_query. Is there any way to handle in WHERE clause itself directly.Thanks. </p>