>SELECT ; > vendorID, ; > vendorname AS VenName, ; > cnt(*) as NumRect, ; > sum(qtyrecv) as RecvQty, ; > sum(qtyrej) as RejQty, ; > Round(100*SUM(qtyrej)/SUM(qtyrecv),2) as PerRej, ; > 0 as OnTime ; > FROM rejects ; > WHERE daterecv BETWEEN StartDate AND EndDate ; > GROUP BY 1,2 ; > ORDER BY 1 ; > INTO CURSOR VendorPerf >>