Hi,
I have 3 table (free).
STOCK item desc
printer
reben
PURCHASE item desc,quantity
printer 12
printer 10
reben 1
reben 7
SALES. item desc, quantity
printer 1
reben 5
I want a report that show me quantity of item have been purchase and sold.The SQL statement as the following:
Select stock.desc,sum(purchase.quantity),sum(sales.quantity);
from stock,purchase,sales;
where stock.desc=sales.desc and purchase.desc = stock.desc;
into cursor temp
The result come out was the 2X of the actual result....
I am not the most powerful man in this world.
I am not the worst man in this world either.
I just as same as all of you.
I still need to learn from my mistakes...