Re: Aggregate function: Different results with jdbc and psql

Поиск
Список
Период
Сортировка
От Tilman Rassy
Тема Re: Aggregate function: Different results with jdbc and psql
Дата
Msg-id 200810071504.14293.rassy@math.tu-berlin.de
обсуждение исходный текст
Ответ на Re: Aggregate function: Different results with jdbc and psql  ("Marc Mamin" <M.Mamin@intershop.de>)
Ответы Re: Aggregate function: Different results with jdbc and psql  ("Marc Mamin" <M.Mamin@intershop.de>)
Список pgsql-jdbc
On Tuesday 07 October 2008 14:48, Marc Mamin wrote:
> maybe you try to retrieve the value of grade with an inappropriate
> method ?

I use the getFoat Method. Here is the code:

// Query grade data:
float result = 0;
ResultSet gradeData = dbHelper.queryUserWorksheetGrade(userId, worksheetId);
if ( !gradeData.next() )
  this.logDebug("### DEBUG 1 ### Result set empty");
else
  {
    result = gradeData.getFloat(DbColumn.GRADE);
    if ( gradeData.wasNull() )
      this.logDebug("### DEBUG 2 ### Column was SQL NULL");
  }

In the logs I see: "### DEBUG 2 ### Column was SQL NULL"

In earlier tries, I experimented with different types for "result" (double,
String). I also casted on the SQL side to "double precision" before
multiplying und summing. No effect.

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

Предыдущее
От: "Marc Mamin"
Дата:
Сообщение: Re: Aggregate function: Different results with jdbc and psql
Следующее
От: "Marc Mamin"
Дата:
Сообщение: Re: Aggregate function: Different results with jdbc and psql