In Sports database, how can I select ONLY 'Customers' with no 'Orders' in one OPEN QUERY statement ?
This is a useful trick I found many years ago that seems to work:
define temp-table ttNoOrder
field field1 as char.
define query q1 for Customer, Order, ttNoOrder.
open query q1 for each Customer no-lock,
first Order of Customer outer-join no-lock,
first ttNoOrder where not available(Order).
get first q1.
repeat while not query-off-end("q1"):
display Customer.CustNum Customer.Name available(Order).
get next q1.
Thank you very much Steve. Fantastic trick.