Results 1 to 5 of 5
  1. #1
    Lounger
    Join Date
    Dec 2002
    Location
    Rochdale, Gtr Manchester, England
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    eliminate duplicates (2002)

    I have two tables with some linked fields. However, both fields can contain duplicates - thus I have a many-many relationship. I want to select records from both tables, but not to display duplicates. Is this possible ? If so, how do I do the query ?

    Many thanks for any help

    Alan

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: eliminate duplicates (2002)

    Open the query in design view. Click in an empty part of the top half of the query window, and activate the Properties window (View/Properties). Its caption should read Query Properties. Set the Unique Values property to Yes. This will eliminate duplicates in the query result.
    This corresponds to the DISTINCT keyword in the SQL statement (SELECT DISTINCT ... FROM ...)

  3. #3
    Lounger
    Join Date
    Dec 2002
    Location
    Rochdale, Gtr Manchester, England
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: eliminate duplicates (2002)

    I tried that but I am returning fields which may be unique. It's only a few fields which end up duplicated (username and serial number for instance). I want to only display one of these - and I don;t care which one.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: eliminate duplicates (2002)

    Ok, set the Unique Values properties to No again, but make the query into a Totals query (View/Totals, or click the button with the greek capital Sigma). Set the Totals option to Group By (the default) for those fields whose distinct values you want to group by, and to First for those fields where you don't care which value you see.

    If this isn't what you want either, try to explain what you want in more detail, preferably with an example to illustrate it.

  5. #5
    Lounger
    Join Date
    Dec 2002
    Location
    Rochdale, Gtr Manchester, England
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: eliminate duplicates (2002)

    I think that's done it. Many many thanks

    Alan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •