Subject Re: [ib-support] group by on derived columns
Author Matteo Giacomazzi
Hi Ray,

Wednesday, July 10, 2002, you wrote:

RD> I have a query that includes the following derived column...

RD> sp.spdate + (7 - extract(weekday from sp.spdate))

RD> ...this returns the week ending date for individual dates in the
RD> query. I need to be able to group on this column to generate week
RD> ending totals. Is there a way to do this in a straight select
RD> query? I can do it via a stored proc. but I'm trying to avoid that
RD> since my app. code constructs straight select queries dependent on
RD> user choices and I don't want to break that if I don't have to.

Does this limitation persist even if you try the same query on a view?
Maybe using a view you could compute the fields you need and then
"grouping" them in a straight query!

Kind regards,

ICQ# 24075529