Subject Re: [ib-support] Re: CAST or GROUP BY error... or is this week becoming too long for me :)
Author Martijn Tonies
> --- In ib-support@y..., "Martijn Tonies" <m.tonies@u...> wrote:
> > Hi,
> > > I have a dialect 3 database (FB 1) with a table that has a
> TIMESTAMP
> > > column (fecha). I executed the following query:
> > >
> > > SELECT CAST(fecha AS DATE) AS fecha
> > > FROM telefono
> > > GROUP BY fecha;
> > >
> > > I would expect a result set of unique dates, but instead I recieve
> > > repeated rows. How come?
> >
> > You are grouping by the original column (fecha), not by the alias.
> The
> > GROUP BY of Firebird 1 can only group on existing columns.
>
> Hi, All. It's again me with my box of hacks ;)

Now - that IS a hack!!


With regards,

Martijn Tonies
InterBase Workbench - the developer tool for InterBase
http://www.upscene.com

Firebird Workbench - the developer tool for Firebird
http://www.upscene.com

Upscene Productions
http://www.upscene.com

"This is an object-oriented system.
If we change anything, the users object."