title: How to create query at runtime with iBATIS
body: <p>How can I create a query at runtime using ibatis (Java)?
  I want the table name to be dynamic.
  For example I have this xml file:</p>
  
  <pre><code>&lt;resultMap id="result" class="Contact"&gt;
      &lt;result property="id" column="id"/&gt;
      &lt;result property="firstName" column="firstName"/&gt;
      &lt;result property="lastName" column="lastName"/&gt;
      &lt;result property="email" column="email"/&gt;
  &lt;/resultMap&gt;
  
  &lt;select id="getById" resultMap="result"&gt;
           select * from contact where id=#id#
  &lt;/select&gt;
  </code></pre>
  
  <p>Here the id is dynamic since it is passed as a parameter.
  But how can I make the table name dynamic?
  I want to select from table contact, contact1, contact2.... but i will now the table name until runtime.</p>
  
  <p>I know you can create the query at runtime with ibatis 3.0 is it possible to do it with ibatis 2.3.4?</p>