db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jill han" <j...@bynum.com>
Subject how to write a query with Date type
Date Wed, 09 Nov 2005 16:15:01 GMT
Below is a piece of code to get records from a table and exception
// startDate and endDate are Date object
// aDate has Date data type in oracle db
String sql = "Select * from aTable ";
sql = sql + " Where aDate ";
sql = sql + " Between '" + startDate + "' And '" + endDate + "' ";
List sqlResult = aTablePeer.executeQuery(sql);

org.apache.torque.TorqueException: ORA-01858: a non-numeric character
was found where a numeric was expected


Thanks in advance.

Jill


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message