Subject Re: [firebird-support] Stupid Programmer or a bug?
Author Teträm Corp
if you didn't trap exceptions, you should have one saying that your
group by clause is not correct:
- all none aggregate fields of the select (at least) must be in the
group by clause
- and you cannot group on an aggregate result

select zone, description, count(description) as calls, sum(duration)
from report
group by zone, description
order by description




Dalton Calford a écrit :
> Ok, I have to admit it has been a very long time since I used group by,
> so I am admitting that this may be my fault from the start but.......
>
> I have a table (report), with four columns
>
> Zone integer
> Description varchar(50)
> StartTime timestamp
> Duration integer
>
>
> So I use IB_SQL to create a simple query
>
> select zone, description, count(description) as calls, sum(duration)
> from report group by calls order by description
>
> I try to prepare the query, but instead of an error, I get nothing.
> IB_SQL looks to be waiting for the server to return but the server's CPU
> is sitting at 0%.
>
> Please someone, tell me that I am just having an off day and that I have
> not found a bug in the group by code in Firebird 1.53
> (and If it is me, what the %&$^ am I doing wrong - I think I need more
> coffee)
>
> Best regards
>
> Dalton
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>