title: Spring jdbc template query returns empty results with multiple arguments
body: <p>Hi i have the following code. </p>
  
  <pre><code>public static final MY_QUERY = "Select distinct A.col1, A.col2 from tableA, tableB where A.col1 = ? and A.col2 = ? and b.id = A.id";
  </code></pre>
  
  <p>in my code i basically do this...  </p>
  
  <pre><code>public List&lt;MyClass&gt; getData(final String input1, final String input2) {
      return this.jdbcTemplate.query(MyQuery, 
                      new Object[] { input1, input2}, 
                      new int[] {Types.VARCHAR, Types.CHAR}, new MyMapper());
  }
  </code></pre>
  
  <p>When i run the results .. it returns empty list. </p>
  
  <p>Now if i do this. </p>
  
  <pre><code>public static final MY_QUERY_2 = new StringBuilder(96)
  .append("Select distinct A.col1, B.col2 from tableA, tableB where A.col1 =").append(input1)
  .append(" and A.col2 = ").append(input2).append(" and b.id = A.id").toString();
  </code></pre>
  
  <p>and inside my DAO class</p>
  
  <pre><code>public List&lt;MyClass&gt; getData() {
      return this.jdbcTemplate.query(MY_QUERY_2, new MyMapper());
  }
  </code></pre>
  
  <p>I get three results. </p>
  
  <p>What is wrong with the first implementation. </p>
  
  <p>Note:If i use only one argument than it works, but if i use 2, than it doesn't. </p>