title: MyBatis String as Parameter
body: <p>I want to use a String parameter for a Select Statement in MyBatis.
  My mapper.xml:</p>
  
  <pre><code>&lt;select id="selectAll" parameterType="String" resultMap="fastXMLResultMap"&gt;
          SELECT CREATIONDATE, DOCUMENTID, TITEL, REGTITEL, INFORCEDATE, DOCTYPE
          FROM #{databBaseTable}
  &lt;/select&gt;
  </code></pre>
  
  <p>And the calling function:</p>
  
  <pre><code>public List&lt;FastXMLObject&gt; selectAll(String databBaseTable) {
  
      SqlSession session = sqlSessionFactory.openSession();
  
      System.out.println("Table: "+databBaseTable);
  
      try {
          List&lt;FastXMLObject&gt; list = session.selectList("FastXMLObject.selectAll",databBaseTable);
          return list;
      } finally {
          session.close();
      }
  }
  </code></pre>
  
  <p>The string dataBaseTable is the name of the table of my database (who would have thought that) because I want to get data dynamically from verious tables.</p>
  
  <p>But unfortunatelly this does not work: Error: ORA-00903: Ungültiger Tabellenname (invalid table name) but it isnt. When I print out the value of "databBaseTable" it is the exact name of the table. And when I write the name of the table to my mapper.xml without a variable it works.
  What do I do wrong?</p>