Display ALL records (1 Viewer)

jadeIT

Systems Analyst
Local time
Today, 10:08
Joined
Jul 16, 2002
Messages
50
I want to display all the products in a products table, and then display the sum of the quantity of these items that are on the order table.

However, if a product thats in the product table is on no orders (that is there are no related records in the orders table), it will not appear in the query result at all.

I need records like this to sill appear in the result with the som of the quantity as zero. How can I do this.
 

rich.barry

Registered User.
Local time
Today, 01:38
Joined
Aug 19, 2001
Messages
176
You probably need to go into the join properties that link your 2 tables and change to 'Include ALL Records from Products and only those records from Orders where the joined fields are equal'
 

jadeIT

Systems Analyst
Local time
Today, 10:08
Joined
Jul 16, 2002
Messages
50
ok that sounds good.. could you give me an example of actual SQL code one would use ? that would be great thanks.
 

jadeIT

Systems Analyst
Local time
Today, 10:08
Joined
Jul 16, 2002
Messages
50
Thanks a lot, that's exactly what I need.
 

Users who are viewing this thread

Top Bottom