Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Ephrata, Washington, USA
    Posts
    683
    Thanks
    0
    Thanked 0 Times in 0 Posts

    97 - Query Returns Duplicates

    I have a parameter query to pull records for user selected dates (i.e., beginning date and ending date). When I run it, it returns multiple records. For instance, it will return 174 records, but when I click on sort by date, it shows 6 records (the right number). The 174 seems to be many many duplicates. What am I doing wrong?

  2. #2
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Ephrata, Washington, USA
    Posts
    683
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 97 - Query Returns Duplicates

    Well, I found the answer. I had copied the query from another query and deleted the fields I didn't want. However, that left a table in the query that I wasn't using. When I deleted that table from the query (even though I wasn't using any of the fields from that table), it worked beautifully. I don't know SQL, but when I looked at it in SQL view, there was an innerjoin. Whew.

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: 97 - Query Returns Duplicates

    You should always remove unused tables from queries. The joins with such a table can easily create multiple instances of a record unless the relationship between that table and the one it's joined to is one-to-one.
    Charlotte

Posting Permissions

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