Subject | SQL Problens |
---|---|
Author | Alcir |
Post date | 2002-04-03T15:36:43Z |
Hi,
I need create one calc of sum of sales. In my Application i have "Discount
by Item" and "Discount General", i need calc the sum of total sales. I use
the line:
SELECT SUM(b.PrItSale*b.QtItSale-DiscountItSale)-SUM(a.DiscountSale) FROM
Sale a, ItSale b
WHERE b.CodSale = a.CodSale
The problem: i give one discount general it repeat the discount for all
items of sale.
Excuse-me my english and thanks for any help.
Alcir Alexandre da Silva
alcir@...
www.afasistemas.com.br
Umuarama - ParanĂ¡ - Brasil
I need create one calc of sum of sales. In my Application i have "Discount
by Item" and "Discount General", i need calc the sum of total sales. I use
the line:
SELECT SUM(b.PrItSale*b.QtItSale-DiscountItSale)-SUM(a.DiscountSale) FROM
Sale a, ItSale b
WHERE b.CodSale = a.CodSale
The problem: i give one discount general it repeat the discount for all
items of sale.
Excuse-me my english and thanks for any help.
Alcir Alexandre da Silva
alcir@...
www.afasistemas.com.br
Umuarama - ParanĂ¡ - Brasil