[AccessD] A momentary lapse of reason: Part II

Gustav Brock Gustav at cactus.dk
Thu Oct 15 07:49:22 CDT 2009


Hi John

Try this:

SELECT 
  tbl_PPMSupplier.AP_No, 
  tbl_PPMSupplier.SupplierID,  
  tbl_PPMSupplier.GRQ 
FROM 
  tbl_PPMSupplier 
WHERE 
  (tbl_PPMSupplier.AP_No Between "2009-ap04" And  "2009-ap09")   
order by 
  tbl_PPMSupplier.AP_No 
UNION 
SELECT 
  tbl_Rejection.AP,
  tbl_Rejection.SupplierID,  
  tbl_Rejection.QuantityAtFault 
FROM 
  tbl_Rejection;

/gustav

>>> Johncliviger at aol.com 15-10-2009 13:25 >>>
 
Hi Guys 
Following on from my recent post the Union query  works. That is it returns 
24498 rows. The problem is the tbl_PPMSupplier  contains 23320 rows and 
tbl_Rejection has 100 rows.  I expected the result view to have  total of the 2 
tables eg 23420 rows. the Union Q is returning  1078 rows more that 
expected. Any suggesstions? 
TIA 
johnc 
SELECT Distinctrow  tbl_PPMSupplier.AP_No, tbl_PPMSupplier.SupplierID,  
tbl_PPMSupplier.GRQ 
FROM tbl_PPMSupplier 
WHERE ((tbl_PPMSupplier.AP_No) Between "2009-ap04" And  "2009-ap09")   
order by tbl_PPMSupplier.AP_No 
UNION ALL SELECT  tbl_Rejection.AP,tbl_Rejection.SupplierID,  
tbl_Rejection.QuantityAtFault 
FROM tbl_Rejection;






More information about the AccessD mailing list