Subject | Re: casting to decimal(9,2) gives different answers if used with a group by clause |
---|---|
Author | wibbleian2 |
Post date | 2009-04-16T21:17:22Z |
--- In firebird-support@yahoogroups.com, "emb_blaster" <EMB_Blaster@...> wrote:
Ian
>Ah, ignore my previous reply - it helps if I read and understand rather than just replying...
> I think the problem is not realy *only* about the group by...
> Did you notice that "cast the sum" results diff than "sum the cast".
> Try the below SQL
>
> SQL> select sum(cast(qty as decimal(9,2))) from tmp;
> > CAST
> > ============
> >
> > 130.27
>
Ian