>I have three tables i.e sales,sales contract,order
>
>sales has one key which is are related to order table,
>sales.salesid=sales contract.salesid and
>sales contract.contractno = order.contractno
>
>i want to produce the report that display all the sales and sales contract and order as well therefore my sql statement as below
>
>select sales.salesid,sales.name,sales.customerid, salescontract.contractno,contractdate, order.sn, itemorder,amount...
>from sales,order,salescontract where sales.salesid=salescontract.saleid and salescontract.contractno=order.contractno into cursor aa
>
>This result only display those record which have sales,sales contractno, and order but i want those record have sales and sales contractno but no order also come out
>
>Is there any other way to do it to force those record have sales and sales contract but no order to come in the report
>
>Thank for helping me
You should LEFT JOIN order table, if you use version 5. In version 3 you will use UNION.
Edward Pikman
Independent Consultant