[AccessD] A momentary lapse of reason: Part II

jwcolby jwcolby at colbyconsulting.com
Thu Oct 15 10:30:09 CDT 2009


But doesn't the union dedupe (DISTINCT) while it is at it?  Thus if he has duplicate information in 
the two tables he would end up with less than the total of both tables.

John W. Colby
www.ColbyConsulting.com


Gustav Brock wrote:
> Hi John
> 
> Well, then try with UNION ALL - this _will_ return all records if you remove your filter (which by the way does look weird and dubious):
> 
> 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 ALL
> SELECT 
>   tbl_Rejection.AP,
>   tbl_Rejection.SupplierID,  
>   tbl_Rejection.QuantityAtFault 
> FROM 
>   tbl_Rejection;
> 
> /gustav
> 
> 
>>>> Johncliviger at aol.com 15-10-2009 16:14 >>>
> Hi Gustav
>  
> Thank you for comments. Your changes reduced the row count to 5093.   I'm 
> unhappy with some of the data so I'm going back to basics. I should have  
> 23420 rows in the union q. 23320 in the tbl_PPMSupplier and 100 in  
> tbl_Rejection.
>  
> Time to leave it alone for a bit.
>  
> Thanks
>  
> Johnc
> 
> 



More information about the AccessD mailing list