Subject | Re: [ib-support] Group By Month, Day, Year etc... |
---|---|
Author | Claudio Valderrama C. |
Post date | 2002-03-29T04:25:26Z |
""lfeliz"" <lfeliz@...> wrote in message
news:a807d6+6qap@......
down to FB not accepting
group by number (non-standard SQL extension)
but not accepting either
group by field_alias.
The view overcomes those problems. It provides named fields (aliases) for
your expressions. Extract() creates an expression-based field.
Otherwise, use triggers to pre-calculate your month, it will be faster when
you do the select and you can index that field if you find that it's faster
with an index to group records.
C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing
news:a807d6+6qap@......
> I amusing Firebird 1. I need to create a query that generatesCreate a view that does the extract calls then group by that view. All boils
> summary totals by month. I had been using EXTRACT w/Month and
> getting all detail and calc'ing summary using my app, but I want the
> server to do the work. Is there a UDF that does data stuff so I can
> take advantage of the GRP-By UDF in FB 1.0.
down to FB not accepting
group by number (non-standard SQL extension)
but not accepting either
group by field_alias.
The view overcomes those problems. It provides named fields (aliases) for
your expressions. Extract() creates an expression-based field.
Otherwise, use triggers to pre-calculate your month, it will be faster when
you do the select and you can index that field if you find that it's faster
with an index to group records.
C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing