Exception?

Поиск
Список
Период
Сортировка
От Thomas Møller Andersen
Тема Exception?
Дата
Msg-id EJECIGJMOLHOMGJCBCFHCEINCEAA.tma@tmaonline.dk
обсуждение исходный текст
Ответы Re: Exception?  ("Dave Cramer" <Dave@micro-automation.net>)
Re: Exception?  ("Dave Cramer" <Dave@micro-automation.net>)
Список pgsql-jdbc
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;
}


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Marko Kreen
Дата:
Сообщение: Re: connection pooling for postgresql in weblogic
Следующее
От: "Dave Cramer"
Дата:
Сообщение: Re: [HACKERS] JDBC improvements