*
* This example is a six-table query which is
* the front end for a fairly complex report.
*
SELECT OFFICES.CITY, SALESMAN.NAME, CUSTOMER.CNO, CUSTOMER.COMPANY,;
  INVOICES.INO, PARTS.DESCRIPT, DETAIL.QTY, DETAIL.PRICE;
 FROM SALESMAN, OFFICES, INVOICES, CUSTOMER, PARTS, DETAIL;
 WHERE OFFICES.ONO = SALESMAN.ONO;
   AND INVOICES.SALESMAN = SALESMAN.SALESMAN;
   AND CUSTOMER.CNO = INVOICES.CNO;
   AND DETAIL.INO = INVOICES.INO;
   AND PARTS.PNO = DETAIL.PNO;
 ORDER BY OFFICES.CITY, SALESMAN.NAME, CUSTOMER.COMPANY, INVOICES.INO,;
  PARTS.DESCRIPT;
 INTO CURSOR STEP5
REPORT FORM STEP5.FRX PREVIEW
