Subject RE: [IBO] invalid database key
Author Claudio Valderrama C.
> -----Original Message-----
> From: bgm1000de@... [mailto:bgm1000de@...]
> Sent: Jueves 5 de Julio de 2001 6:52
>
> When I try to fire the following SQL statement the connection is
> getting lost after scrolling through the result
> ------
> SELECT ADOSEN.JAHR, EXPOSITIONEN.STAMMNUMMER,
> Sum(EXPOSITIONEN.MSVAUSSEN) AS EXPS_NAMTLICH,
> Sum(EXPOSITIONEN.MSVINNEN) AS EXPS_INKORP,
> ADOSEN.SUMME AS EXPS_AMTLICH
> FROM EXPOSITIONEN INNER JOIN ADOSEN
> ON (EXPOSITIONEN.JAHR = ADOSEN.JAHR)
> AND (EXPOSITIONEN.STAMMNUMMER = ADOSEN.STAMMNUMMER)
> GROUP BY ADOSEN.JAHR, EXPOSITIONEN.STAMMNUMMER, ADOSEN.SUMME
> ORDER BY ADOSEN.JAHR, EXPOSITIONEN.STAMMNUMMER;
> ------
> [...] The field ADOSEN.SUMME is a "computed-by" field. After
> turning it into a normal numeric field everything's working fine. Is
> this a bug?

To my knowledge, you never stated what server version are you using. Is this
IB6? Your pain could be avoided in advance if "that unnamed company"
provides the list of known IB bugs to anyone that wants to research it.
Long time ago, a bug with computed fields (and any expression like EXTRACT)
coupled with GROUP BY was squashed by Firebird. I can't comment on IB more
than I already said to a QA person in a Borland NG: even the certified IB6
carries same old known bugs than always and offered a couple of specific
(although not detailed) examples.
Without knowing the structure of your tables, can't say more but definitely
YES, you should be able to GROUP BY referencing server-computed fields. It
works in firebird... because the needed test for a null pointer was included
in the server's code.

C.