Subject Re: [firebird-support] Aggregate functions
Author Helen Borrie
At 09:30 AM 5/06/2004 +0000, you wrote:
>Hi,
>
>I want to do something like
>
>select sum(a) as total, b
>from MYTABLE
>where b like 'whatever%'
>having total > 0
>
>But it moans at me using the labels. I know it works without the
>labels, as in this works:
>
>select sum(a) as total, b
>from MYTABLE
>where b like 'whatever%'
>having sum(a) > 0
>
>
>is there anyway of getting it to work with labels?

No, no way.

You missed out the Group By?

select sum(a) as total, b
from MYTABLE
where b starting with 'whatever'
group by b
having sum(a) > 0

/heLen