Duplicates in Query

From: Mel (Mel_at_discussions.microsoft.com)
Date: 02/16/05


Date: Wed, 16 Feb 2005 13:59:04 -0800

I'm designing a query from two tables (Administrators and Budget) where I
need to
generate a combined list of email addresses. I have several people in my
Administrators table who have more than one record/unique ID because they
belong to multiple departments.

When I run the query, I either get results where each email address from the
Budget table duplicates to match each record from the Administrator's table.
This occurs when I've selected Unique Records "Yes" in the Query Properties.

When I select Unique Values "Yes", then the Administrator's email addresses
multiply to match each record from the Budget table.

I end up with 1000s of records rather than just 80.

So, how do I fix the query to prevent the data from multiplying? Also, how
do I query so that I don't get the same name with different unique IDs (Admin
table) from popping up?

-- 
Thanks,
Mel


Relevant Pages

  • Re: SQL Query - Help with Joins
    ... I don't know for certain without running it through the query analyzer, ... (select * from budget ... the sales table has a seven character product code of which the first ... three characters set a parent product group (for which the budgets are ...
    (comp.sys.ibm.as400.misc)
  • Re: Group by Rollup
    ... The basic reason that your query is returning multiple records for the same ... Budget Code & Desc is you have the pstStatusID field included in the GROUP ... for my report "rptBudgetsCombined". ...
    (microsoft.public.access.queries)
  • Re: Group by Rollup
    ... I didn't realize I could do the roll up in the report design. ... The basic reason that your query is returning multiple records for the same ... Budget Code & Desc is you have the pstStatusID field included in the GROUP ...
    (microsoft.public.access.queries)
  • Re: Simple Sum
    ... In a query, you ... can create an "alias" field that is used for calculations. ... formulas for Total Budget, Total Actual, etc. ... I also tried entering Expression in place of Sum. ...
    (microsoft.public.access.queries)
  • Re: HELP~Query Not pulling all the data
    ... It is bringing me all the data but in the budget ... Below is the SQL ... FROM LEFT JOIN [Account Charges ... Charges Query].Name_of_Account,. ...
    (microsoft.public.access.queries)