title: SQL Dynamic ASC and DESC
body: <p>I have the following SQL statement where order by clause is passed dynamically .
  How can I pass 'order by asc and desc' dynamically to SQL?</p>
  
  <pre><code>SELECT table1.prod_id,table2.prod_name from table1 left outer join table2
                ON table1.prod1 = table2.prod_id 
                ORDER BY CASE WHEN :odb = 1 THEN prod_id END
  </code></pre>
  
  <p>I would like pass <code>order by asc or desc</code> to above SQL dynamically, </p>
  
  <p>how can I do this?</p>