Subject | Re: [firebird-support] Problemas with SUM() |
---|---|
Author | Omar Rosa |
Post date | 2003-06-30T12:15:15Z |
HI!
TRy this:
select il.quantidade - (select sum(ic.quantidade) from itenscomprados
where.... ....) from .....
Bye!
TRy this:
select il.quantidade - (select sum(ic.quantidade) from itenscomprados
where.... ....) from .....
Bye!
----- Original Message -----
From: "João Nelson" <joaonelson@...>
To: <firebird-support@yahoogroups.com>
Sent: Friday, June 27, 2003 5:13 PM
Subject: Re: [firebird-support] Problemas with SUM()
> Hi,
>
> Thank you,
> But, I can not make it. My Quary is:
>
> Select IL.Quantidade-Sum(IC.Quantidade)
> From ItensLista IL left join ItensComprados IC on
> (il.codproduto=ic.codproduto and il.codlista=ic.codlista)
> left join Produtos p on (IL.CodProduto=P.CodProduto)
> Where il.CodLista = :PARAM
> Group by IL.Quantidade
>
> The Table IC have must values with cod. but the table IL Cod is UNIQUE =)
> Then I do SUM(Quantidade). Help me please
>
>
> ----- Original Message -----
> From: "Martijn Tonies" <m.tonies@...>
> To: <firebird-support@yahoogroups.com>
> Sent: Friday, June 27, 2003 4:42 PM
> Subject: Re: [firebird-support] Problemas with SUM()
>
>
> > Hi João,
> >
> >
> > > Hello, =)
> > > I am with problems SUM (). My Query returned NULL but my values is 10
> and
> > > NULL. Why?
> >
> > 10 + NULL results into NULL.
> >
> > If you want to exclude NULLs, do:
> >
> > select sum(mycol)
> > from table
> > where mycol is not null
> >
> >
> > With regards,
> >
> > Martijn Tonies
> > Database Workbench - the developer tool for InterBase & Firebird
> > Upscene Productions
> > http://www.upscene.com
> >
> >
> >
> > To unsubscribe from this group, send an email to:
> > firebird-support-unsubscribe@yahoogroups.com
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.491 / Virus Database: 290 - Release Date: 18/6/2003
>
>
>
> To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>