Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2013
    Posts
    4

    Unanswered: Query is duplicating data

    I'm trying create an append query using linked tables that were created from an excel spreadsheet. I can't get past the first part - which is creating the basic query. My three tables are location, name, and social. Basically I just want these records to match up, but that's not what I'm getting.

    The first column is coming back mostly correct. I have 219 rows in each table. So you could say 219 locations (there are duplications since we really only have 10). But after it hits 219, the information repeats again. 1-219 followed by 1-219, etc.

    The second column is coming back with the first name repeated 219 times before moving on to the second name. The second name repeats 219 times, before going to the third for 219 times, etc.

    The third column is coming back with the first social record being repeated for all 219 names. So basically we get through one complete set all 219 names being repeated 219 times each before it moves on to the second social. This repeats.

    Basically my 219 entries have turned into 800,000+.

    I have no idea what I am doing wrong.

  2. #2
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,424
    Provided Answers: 8
    Check out your Joins

    by the looks you have add the Tables to the query and haven't join then

    so query is join all records to all records
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  3. #3
    Join Date
    Apr 2013
    Posts
    4
    Thanks! Definitely makes sense, but I have no idea how to create a join.

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    well we have no idea of your Query, so I guess that makes us even in the dark
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Apr 2013
    Posts
    4
    I'm trying to do an append query, but am now working on the joins before I can move forward with the append.

    I started with two of the tables since all the info I could find on creating a join is just creating a join between two tables. I'm trying the following, but when I run the query nothing shows up except the column headers.

    SELECT Branch.Branch, Name.[Last Name, First Name]
    FROM Branch INNER JOIN Name ON branch.branch = name.[last name, first name]

  6. #6
    Join Date
    Apr 2013
    Posts
    4
    I do have another table that I'd like to join, but am not sure of what I need to add in to do a third. The third table is called social and the information is also social. So social.social?

    I apologize if I'm not giving enough information. I did not create this database and the person that did is no longer with us. While I'm ok at the management part, I'm not great at the fixing/creating piece.

    Each of the three tables I have only have one column of information in them if that helps.

Posting Permissions

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