title: SCALA TERADATA SQL Exception
body: <p>I am new to teradata and also scala. I am executing a query in scala which is throwing SQL Exception but the same query is running fine in Teradata studio.  </p>
  
  <p>Below is the query:</p>
  
  <pre><code> SELECT COUNT(loan_no)
      ,field1
      ,field2
      ,field3
  FROM testdb.loan
  WHERE field1 &lt; DATE '2017-09-30'
  GROUP BY field1
      ,field2
      ,field3
  ORDER BY field1
  </code></pre>
  
  <p>Error received is: </p>
  
  <blockquote>
    <p>java.sql.SQLException: [Teradata Database] [TeraJDBC 15.00.00.20]
    [Error 3707] [SQLState 42000] Syntax error, expected something like a
    name or a Unicode delimited identifier or an 'UDFCALLNAME' keyword or
    '(' between the 'FROM' keyword and the 'Select' keyword.</p>
  </blockquote>
  
  <p>Scala code</p>
  
  <pre><code>val queryString = "SELECT COUNT(loan_no),field1,field2,field3 FROM testdb.loan WHERE field1 &lt; DATE '2017-09-30' GROUP BY field1,field2,field3 ORDER BY field1"
  
  val connString = 
  "jdbc:teradata://test.udaystd.com/,TMODE=TERA,charset=UTF8, 
   user="+userid+", password="+passwd+", ,charset=UTF8"
  
  val dbdriver = "com.teradata.jdbc.TeraDriver"
  
  val jddf = sqlContext.load("jdbc",
    Map("url" -&gt; connString,
     "dbtable" -&gt; queryString,
     "driver" -&gt; dbdriver))
  </code></pre>
  
  <p>Please help.</p>