--两个表都有近两万行,估计比较时间在十分钟左右.
SELECT SALES.SALE_ID as bysale
FROM SALES
WHERE saledate>'2007-08-01' and saledate<'2007-09-1'
      and SALE_ID not in
(
  select distinct(salesproduct.sale_id) as bysalesproduct
  from salesproduct,sales
  WHERE saledate>'2007-08-01' and saledate<'2007-09-1'and
  sales.sale_id=salesproduct.sale_id
)