Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to query 2 table that include all record in parent table
Message
De
13/12/1999 02:22:16
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
How to query 2 table that include all record in parent table
Divers
Thread ID:
00302598
Message ID:
00302598
Vues:
58
I have 2 tables :
Parent Table (ITEM) Child Table (ORDER DETAIL)
Item_code (Primary Key) Order_No
name Item_Code
etc...... etc......

I want to know the Item that never sold. I write this SQL :

SELECT Item.Item_Code,Item.name,COUNT(order_Detail.ItemCode);
FROM Inventory!Item,Inventory!Order_Detail;
WHERE Item.Item_Code = Order_detail.Item_code;
INTO CURSOR SYS(2015)

this code didn't result all of the item, only the item that match
in oreder_detail (Item with count_1 = 0 not include).

How to include all of the item (parent table) even the record has no relation in child table (query result is 0).

I'm using VFP 3.0 running on windows 95.
thank's.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform