Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL
Message
De
31/10/1998 10:59:36
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
SQL
Divers
Thread ID:
00153167
Message ID:
00153167
Vues:
52
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...
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform