Subject | Re: [ib-support] Newbie question IB about select |
---|---|
Author | Martijn Tonies |
Post date | 2002-08-28T17:03:36Z |
Hi,
Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."
> > >I am a newbie to IB.be
> > >
> > >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
> > quoted identifiers, or you would not have been allowed to createthis
> > them. Year and Month are reserved words. Are they columns? If so,
> > should work:that
> >
> > select "Year", "Month", SUM(Sales) from sales group by "Month";
> >
> > (Sales would need quotes too if you created the database with a tool
> > forces quoted identifiers...)grouped
>
>
> Maybe I'm wrong, here, heLen, but I though aggregate queries must be
> by ALL non-aggregate columns by SQL standards.That's why the error message would help a lot :)
Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."