Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The INNER JOIN is killing me
Message
De
30/01/2001 13:03:24
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
The INNER JOIN is killing me
Divers
Thread ID:
00470194
Message ID:
00470194
Vues:
86
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform