Results 1 to 4 of 4
  1. #1
    funkygoorilla is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    93

    Query will duplicate records


    I have multiple queries working with one table, that when ran, will show a single row of data twice. I have verified that there is only one applicable row in this table, and have even deleted all information in it and entered only this one row worth of information. But, when I run a query against it, the query returns duplicate results. Can anyone give me a hint of why this may be happening?
    Thanks,
    FunkyG

  2. #2
    stmoong is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Sep 2011
    Location
    Singapore
    Posts
    108
    You can use DISTINCT in your query to return unique row based on your selected columns.

    SELECT DISTINCT col1, col2 FROM table1 WHERE ...

    Possible reason might be col3, which is not queried, would have different values when you run the SELECT statement. If you want to check, you could do a SELECT * FROM table1 WHERE ...

  3. #3
    funkygoorilla is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    93
    Hi, thanks for your reply. I think I figured it out. I had a improperly place foreign key, and it was making my query return double results. However, your post will be good to reference in the future. Thanks again!
    FunkyG

  4. #4
    stmoong is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Sep 2011
    Location
    Singapore
    Posts
    108
    You're welcome.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Query to count errors when records duplicate
    By mkallover in forum Queries
    Replies: 1
    Last Post: 07-15-2011, 11:40 PM
  2. ELSIF Query to Read Duplicate Records
    By Overzero in forum Queries
    Replies: 7
    Last Post: 06-03-2011, 01:38 PM
  3. How to not show duplicate records in query?
    By JimmD43 in forum Queries
    Replies: 3
    Last Post: 05-29-2011, 02:54 PM
  4. Replies: 3
    Last Post: 05-03-2011, 01:36 PM
  5. Replies: 1
    Last Post: 05-21-2010, 02:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums