title: Running simple SELECT MS SQL Server query with JDBCTemplate using JTDS driver and c3p0 data source
body: <p>I am connecting to MS SQL server with following datasource </p>
  
  <pre><code>  &lt;bean id="myDataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
      destroy-method="close" &gt;
      &lt;property name="driverClass" value="net.sourceforge.jtds.jdbc.Driver" /&gt;
      &lt;property name="jdbcUrl" value="jdbc:jtds:sqlserver://&lt;server&gt;:&lt;port&gt;" /&gt;
      &lt;property name="user" value="${echo_db_user}" /&gt;
      &lt;property name="password" value="${echo_db_password}" /&gt;
    &lt;/bean&gt;
  
        &lt;bean id="myProviderDAO" class="com.care.dao.impl.DataProviderImpl"&gt;
      &lt;property name="dataSource" ref="myDataSource" /&gt;
    &lt;/bean&gt;
  
  
  public class DataProviderImpl extends JdbcDaoSupport{
  public Object runQuery(String staticQuery) {
      try {
          return getJdbcTemplate().queryForList(staticQuery);
           } catch (Exception e) {
                  e.printStackTrace();
               }
          return null;
      }
  }
  </code></pre>
  
  <p>staticQuery is: </p>
  
  <pre><code>  Select
      sender,
          status_dt
      FROM
          ServiceTickets.dbo.trouble_ticket 
      WHERE
          status_dt BETWEEN '02-17-2010 07:00:00'  AND '04-30-2014 05:00:00'
  </code></pre>
  
  <p>When running this query I am getting following exception: </p>
  
  <pre><code>org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [
  
      Select
      sender,
          status_dt
      FROM
          ServiceTickets.dbo.trouble_ticket 
      WHERE
          status_dt BETWEEN '02-17-2010 07:00:00'  AND '04-30-2014 05:00:00'
  
  
                  ]; nested exception is java.sql.SQLException: ORA-00933: SQL command not properly ended
  
          at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:98)
          at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
          at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
          at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
  </code></pre>
  
  <ol>
  <li>Connection is happening as I have debugged the code and it passed where connection is retrieved. </li>
  <li>Same query If I execute on Toad (client to ms sql server) executes properly.</li>
  <li>I have used same set of steps to connect to Qracle DB and executing its queries and it works fine, only in case of MS SQL server I am facing this issue. </li>
  </ol>