General information
Category:
Coding, syntax & commands
Title:
How to query 2 table that include all record in parent table
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only