Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The INNER JOIN is killing me
Message
From
30/01/2001 13:03:24
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
The INNER JOIN is killing me
Miscellaneous
Thread ID:
00470194
Message ID:
00470194
Views:
89
SELECT Invoices.invoiceid, Invoices.ctype, Invoices.i_TranID, ;
Invoices.s_date, Invoices.e_date,;
Customers.Addressid AS cid, Products.prod01 AS cProd1, ;
Products.prod02 AS cProd2, Products.prod03 AS cProd3, ;
Address.Address1 AS Address1, Address.Address2 AS Address2;
FROM rm!invoices;
INNER JOIN rm!invdetail on Invoices.invoiceid = Invdetail.invoiceid;
INNER JOIN rm!customers on Invoices.customerid = Customers.customerid;
INNER JOIN rm!Address on Address.AddressID = Customers.AddressID;
INNER JOIN rm!products on Products.productid = Invoices.productid;
WHERE Invoices.ctype = 'INVOICE' AND Invoices.posted <> 'Y' AND NOT DELETED();
GROUP BY Invoices.InvoiceID ;
ORDER BY Invoices.s_date ;
INTO CURSOR Temp1

*** The problem I have with this is:
if there is a record in the Invoices table that qualifies for the "WHERE" but there is no record in the Invdetail table this code does not give me the record in the Invoices table.
How can I rewrite this to ignore the fact that there is no record in the Invdetail table?

Thanks Dennis
Dennis Collins
TRACKUM, Inc.
Next
Reply
Map
View

Click here to load this message in the networking platform