我正在尝试使用Spring JDBC 3.1.2.RELEASE从HSQLDB 2.2.8查询数据,这是语句:
"SELECT id, account_id, operator_id, amount, currency_type, date
FROM account_entries WHERE account_id=? AND date BETWEEN DATE '?' AND DATE '?' + 1 DAY"
属性是:
1 (java.lang.Integer)
2012-09-06 (java.sql.Date)
2012-09-06 (java.sql.Date)
我收到的错误:
PreparedStatementCallback; SQL [SELECT id, account_id, operator_id, amount,
currency_type, date FROM account_entries WHERE account_id=?
AND date BETWEEN DATE '?' AND DATE '?' + 1 DAY]; data exception:
invalid datetime format; nested exception is java.sql.SQLDataException:
data exception: invalid datetime format