Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2012
    Posts
    15

    Unanswered: Query Duplicating information off data not selected in query?

    Table A has patient information

    Table B has State information regarding that state.

    Each Table has State ID field

    Table B has multiple State ID rows with different supporting data in each row. I am not using of those values in my query however.

    I just need to get the Region column which is always the same.

    However, my query is returnign duplicates. Im assuming its due to the fact that the State ID is int he table B multiple times.

    How can I resolve this? let me know ifyou need more information

  2. #2
    Join Date
    Jun 2005
    Posts
    43
    Can you make a query out of Table B with only State ID and Region? (After you design your query, go to SQL view to add the word DISTINCT.) Then join Table A to this query? That should eliminate your duplicates.
    Mos

  3. #3
    Join Date
    Dec 2012
    Posts
    15
    Quote Originally Posted by get.mos View Post
    Can you make a query out of Table B with only State ID and Region? (After you design your query, go to SQL view to add the word DISTINCT.) Then join Table A to this query? That should eliminate your duplicates.
    i actually made a table with those two fields. and got duplicates. Each state ID was completely unique in the table too . so i am unsure what is happening

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    can we see the query (open the query in design mode, switch the view to SQl then copy and paste the SQL here)
    the table design(s)
    a sample of the data. so it reduces the amount of work for others needed to re create your problem
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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