Skip site navigation (1) Skip section navigation (2)

Re: Aggregate function problem in VB6

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Sekcja Informatyki Medycznej" <informatyka(at)cskmswia(dot)pl>
Cc: "pgsql-odbc" <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: Aggregate function problem in VB6
Date: 2001-05-31 16:38:19
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc
"Sekcja Informatyki Medycznej" <informatyka(at)cskmswia(dot)pl> writes:
> I have encountered a problem with following query run over ODBC in MS VS 6.0
> SP5 in DataEnvironment designer:

> "SELECT SUM(field1) FROM table1;"
> field 1 is of type INT4.

> There is "E_FAIL" error message.

SUM() of int4 yields type NUMERIC these days.  Perhaps MS VS doesn't
know what that is, or perhaps our ODBC driver doesn't handle it well.

A possible workaround is to cast the result back to int4, but that
just re-exposes you to the overflow risk we were trying to eliminate...

			regards, tom lane

In response to

pgsql-odbc by date

Next:From: Johann ZuschlagDate: 2001-05-31 19:52:47
Subject: Possible memory leakage?
Previous:From: Sekcja Informatyki MedycznejDate: 2001-05-31 15:10:18
Subject: Aggregate function problem in VB6

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group