Subject | Re: Newbie question IB about select |
---|---|
Author | arnorog |
Post date | 2002-08-29T14:01:48Z |
Woody,
The first reply to my question given by Alan McDonald pointed me in
the right direction:
select
Year, Month, Sum(Sales)
from
sales
group by Year, Month
.... will work
This works indeed, it will return non-aggregated and aggregated
columns together.
By the way, I am using Clarion 5.5EE (http://www.softvelocity.com)
and Gemini ODBC.
Thanks,
Arno Rog
The first reply to my question given by Alan McDonald pointed me in
the right direction:
select
Year, Month, Sum(Sales)
from
sales
group by Year, Month
.... will work
This works indeed, it will return non-aggregated and aggregated
columns together.
By the way, I am using Clarion 5.5EE (http://www.softvelocity.com)
and Gemini ODBC.
Thanks,
Arno Rog
--- In ib-support@y..., "Woody" <woody.tmw@i...> wrote:
> From: "Martijn Tonies" <m.tonies@u...>
> >
> > Anyway, when one uses an aggregate, all columns should be
aggregated.
> >
> > So, when using a SUM, MAX or GROUP BY etc you need to use
> > some kind of aggregate function on all resulting columns.
>
> Martijn,
>
> What do you mean by this? Are you saying that you shouldn't have any
> non-aggregate columns returned in an aggregate query? That's
certainly what
> it sounds like to me, or I am I just mis-interpreting what you mean?
>
> >
> > If this REALLY works in your other db-like-engine, then it is
wrong.
>
> This will depend on your answer to the previous question above.
>
> Woody (TMW)
>
> ----------------------
> "To invent, you need a good imagination and a pile of junk."
> Thomas Edison