[AccessD] deduping qry results

O'Connor, Patricia (OTDA) Patricia.O'Connor at otda.state.ny.us
Fri Mar 28 11:37:17 CDT 2008


William

Could you show an example of what you are trying to avoid.
Or be a bit more specific?

What element(S) are you trying not to get a duplicate of ?  

  SELECT DISTINCTROW 
       tblExhibitorProducts.EPCID, 
       qryApr08Grid.CompanyID, 
       qryApr08Grid.CompanyName, 
       qryApr08Grid.AdClass, 
       qryApr08Grid.SGOn 
  FROM tblExhibitorProducts 
    INNER JOIN qryApr08Grid 
    ON tblExhibitorProducts.CompanyID = qryApr08Grid.CompanyID 
  WHERE (tblExhibitorProducts.EPCID=11) 
     OR (qryApr08Grid.AdClass ="A") ;

I have an idea but need to see if I am right

**************************************************
* Patricia O'Connor    
* Information Technology Specialist 3 (Programming) 
* OTDA - BDMA
* (W) mailto:Patricia.O'Connor at otda.state.ny.us
* (w) mailto:aa1160 at nysemail.state.ny.us
**************************************************
 

> 
--------------------------------------------------------
This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments.  Please notify the sender immediately by reply e-mail and delete the e-mail from your system. 


-----Original Message-----

> From: accessd-bounces at databaseadvisors.com 
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of 
> William Hindman
> Sent: Friday, March 28, 2008 11:43 AM
> To: Access Developers discussion and problem solving
> Subject: [AccessD] deduping qry results
> 
> ...senior moment ...posted on another thread by mistake :(
> 
> ...given the following query:
> 
> SELECT DISTINCTROW tblExhibitorProducts.EPCID, 
> qryApr08Grid.CompanyID, qryApr08Grid.CompanyName, 
> qryApr08Grid.AdClass, qryApr08Grid.SGOn FROM 
> tblExhibitorProducts INNER JOIN qryApr08Grid ON 
> tblExhibitorProducts.CompanyID = qryApr08Grid.CompanyID WHERE
> (((tblExhibitorProducts.EPCID)=11)) OR (((qryApr08Grid.AdClass)="A"));
> 
> ...how can I avoid duplicates in the OR results?
> ...I've tried totals and uniuqe values/records but nothing 
> produces consistent results ...help!
> 
> William
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 
>





More information about the AccessD mailing list