Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to query 2 table that include all record in parent table
Message
From
13/12/1999 02:22:16
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
How to query 2 table that include all record in parent table
Miscellaneous
Thread ID:
00302598
Message ID:
00302598
Views:
59
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.
Next
Reply
Map
View

Click here to load this message in the networking platform