Subject | Re: [ib-support] Newbie question IB about select |
---|---|
Author | Woody |
Post date | 2002-08-28T16:53:53Z |
From: "Helen Borrie" <helebor@...>
by ALL non-aggregate columns by SQL standards.
Woody (TMW)
----------------------
"To invent, you need a good imagination and a pile of junk."
Thomas Edison
> At 10:17 AM 28-08-02 +0000, you wrote:Maybe I'm wrong, here, heLen, but I though aggregate queries must be grouped
> >Hello,
> >
> >I am a newbie to IB.
> >
> >In MySQL I can use the next select:
> >
> > select Year, Month, SUM(Sales) from sales group by Month;
> >
> >However, this does not seem to work in IB.
>
> When you post support questions, provide enough information to help us
> understand your problem. In what way doesn't it work...?
>
> If you have columns named Year and Month in IB 6 or Firebird, they must be
> quoted identifiers, or you would not have been allowed to create
> them. Year and Month are reserved words. Are they columns? If so, this
> should work:
>
> select "Year", "Month", SUM(Sales) from sales group by "Month";
>
> (Sales would need quotes too if you created the database with a tool that
> forces quoted identifiers...)
by ALL non-aggregate columns by SQL standards.
Woody (TMW)
----------------------
"To invent, you need a good imagination and a pile of junk."
Thomas Edison