Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL
Message
From
31/10/1998 10:59:36
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
SQL
Miscellaneous
Thread ID:
00153167
Message ID:
00153167
Views:
51
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...
Next
Reply
Map
View

Click here to load this message in the networking platform