Subject Re: [IBO] Firebird Niggle
Author Lester Caine
> Well, MOD isn't an aggregate function like SUM, AVG, ...
> so the third column in the SELECT list is missing in
> your GROUP BY. And, it isn't directly related to the
> MOD function, because the following query gives the same
> error.
>
> SELECT APPLET
> , INIT_ID AS STAFF
> FROM TICKET
> GROUP BY APPLET

OK I was trying to simplify to spot the problem

The full query is

SELECT T.APPLET
, T.INIT_ID AS STAFF
, MOD( T.INIT_ID, 1000 ) AS STAFF_ID
, COUNT (*) AS COUNTS
, T.INIT_ID
FROM TICKET T
WHERE T.TICKET_REF BETWEEN :FROMD AND :TOD
GROUP BY T.APPLET, T.INIT_ID
ORDER BY T.APPLET, 2

And is running on a number of sites without any problem with
Firebird 0.9.4, but gives the error on FB1 Build 821.
Comment out the MOD line and the query will prepare. Switch
back to the older Firebird and the query will prepare ( in
IB_SQL ).

Where do I go next is the question?

--
Lester Caine
-----------------------------
L.S.Caine Electronic Services