SELECT cust.custno, cust.name, invoice.date, invoice.total ; FROM cust JOIN invoice ON Cust.Custno = Invoice.Custno ; WHERE invoice.date = {06/30/98} ; INTO CURSOR tempThe join in the where clause is a simple, or INNER, join. To produce OUTER joins in using the WHERE clause requires a sub-select as in;
SELECT cust.custno, cust.name, invoice.date, invoice.total ; FROM cust, invoice ; WHERE cust.custno = invoice.custno ; AND invoice.date = {06/30/98} ; UNION ; SELECT Cust.Custno, Cust.Name, {}, 0000.00 ; FROM Cust ; WHERE Cust.Custno NOT IN (SELECT Custno FROM Invoices) ; INTO CURSOR tempThe above syntax will produce a LEFT OUTER JOIN.