Does someone know how to create an outerjoin in MSQuery using C/ODBC without creating multiple queries ? Example: Select a.id , a.name , sum(b.amount) , sum(c.amount) from customer a , invoice b , salesheader c where b.cus_id = a.id and c.cus_id = a.id group by a.id, a.name I would like the query to return a row per customer even if it finds no rows in either invoices and/or salesheader. id name invoiced sold 1 quint 10000 15000 2 whirl 00000 05000 and so on.
I successfully use the ‘LEFT JOIN’ construct to do this from MS Access. For example - [Sales Header] LEFT JOIN [Warehouse Document Header]ON [Sales Header].[Last Warehouse Document No_] = [Warehouse Document Header].No_ returns all rows from Sales Header regardless of the existance of rows in Warehouse Document Header