Re: Exception?
От | Dave Cramer |
---|---|
Тема | Re: Exception? |
Дата | |
Msg-id | 00d601c17c61$6fda3d50$8201a8c0@inspiron обсуждение исходный текст |
Ответ на | Exception? (Thomas Møller Andersen <tma@tmaonline.dk>) |
Список | pgsql-jdbc |
Thomas, I just tried this with the latest version of the jdbc driver, and postgres 7.1.3 without any problems. What versions are you running Dave -----Original Message----- From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Thomas Møller Andersen Sent: Monday, December 03, 2001 1:35 PM To: pgsql-jdbc@postgresql.org Subject: [JDBC] Exception? Does anyone have an explanation to the following exception: Unable to identify an operator '>=' for types 'numeric' and 'float8 You will have to retype this query using an explicit cast The column is: numeric(10,2) The query is from this method: private Collection selectInRange(BigDecimal low, BigDecimal high) throws SQLException { String selectStatement = "select id from mytable " + "where amount between ? and ?"; PreparedStatement prepStmt = con.prepareStatement(selectStatement); prepStmt.setBigDecimal(1, low); prepStmt.setBigDecimal(2, high); ResultSet rs = prepStmt.executeQuery(); ArrayList a = new ArrayList(); while (rs.next()) { String id = rs.getString(1); a.add(id); } prepStmt.close(); return a; } ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
В списке pgsql-jdbc по дате отправления: