title: How to use # instead of $ in DB2 query with iBatis
body: <p>I use DB2 with iBatis in my project.</p>
  
  <p>There are many </p>
  
  <pre><code>FETCH FRIST $perPg$ ROWS ONLY
  </code></pre>
  
  <p>queries for paging in DaoMap.xml files. But it seems dangerous in case of query injection. so I want to change them using # instead of $, but I can't figure it out.</p>
  
  <p>Functions like <code>CAST(#perPg# AS INTEGER)</code> doesn't work on FETCH query. How can I solve this problem?</p>