title: Spring JDBC Template Query with String/Varchar parameters
body: <pre><code>SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
  String query = "select a.alert_id from alert a where (alert.last_execution is null or trunc(alert.last_execution) &lt; to_date(?, 'dd/MM/yyyy') ) and alert.frequency = ?";
  jdbcTemplate.query(query, new Object[] {sdf.format(new Date()), "DAILY"}, new AlertRowMapper())
  </code></pre>
  
  <p>It retuns an exception in the query line:</p>
  
  <p>SQL state [99999]; error code [17004]; Invalid column type; nested exception is java.sql.SQLException: Invalid column type
      at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)</p>
  
  <p>Do someone know why it is not working?</p>
  
  <p>Thanks</p>