Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Duplicate in query

Discussion in 'Information Technology' started by Levans digital, Jul 28, 2006.

  1. Levans digital

    Levans digital
    Expand Collapse
    Guest

    Hello,

    I joined two query by autonumber ID's

    One query has 4 record and the other has 6 records. However on joining them
    I get 24 records this amount is due to duplicates what might be causing this.
    All that I want is the related fields from that query.

    I tried to groups the records in the query with the hope of only getting the
    six records from the primary query with related fields from the secondary
    query the the "group by" does not work.

    help?
     
  2. Loading...

    Similar Threads Forum Date
    Sikh News Duplicate passports offered by GOI to Indians residing in Italy Breaking News Sep 19, 2009
    Sikh News Case of the duplicate signatures (San Jose Mercury News) Breaking News Apr 4, 2005
    Query about Jhatka Meat by Shooting in Head Sikh Sikhi Sikhism Aug 26, 2011
    Who is a sikh? A non sikh friend's query!! Sikh Sikhi Sikhism Apr 30, 2010
    General Query Hard Talk Sep 4, 2008

  3. MH

    MH
    Expand Collapse
    Guest

    4 * 6 = 24

    What you have there is a cartesian product! i.e. all records from one table
    joined to all the records in the other table.

    Specify some kind of join in your query, are you using the design grid to
    produce your query? Drag the Primary Key from one table to the Foriegn Key
    in the other table and then run the query.

    MH

    "Levans digital" <Levansdigital@discussions.microsoft.com> wrote in message
    news:B1E31BBD-0CD8-4FA6-AFE3-C0B64393C9D7@microsoft.com...
    > Hello,
    >
    > I joined two query by autonumber ID's
    >
    > One query has 4 record and the other has 6 records. However on joining
    > them
    > I get 24 records this amount is due to duplicates what might be causing
    > this.
    > All that I want is the related fields from that query.
    >
    > I tried to groups the records in the query with the hope of only getting
    > the
    > six records from the primary query with related fields from the secondary
    > query the the "group by" does not work.
    >
    > help?
     
  4. Jerry Whittle

    Jerry Whittle
    Expand Collapse
    Guest

    There's only one practical way for us to know: Show us the SQL. Open the
    query in SQL view and copy and past it here. Information on primary keys and
    relationships would be a nice touch too.

    However since 4 * 6 = 24, it sure looks like a Cartesian join. Are you sure
    that the two tables are joined? Is there a black line between the two tables
    in the QBE grid?
    --
    Jerry Whittle
    Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


    "Levans digital" wrote:

    > Hello,
    >
    > I joined two query by autonumber ID's
    >
    > One query has 4 record and the other has 6 records. However on joining them
    > I get 24 records this amount is due to duplicates what might be causing this.
    > All that I want is the related fields from that query.
    >
    > I tried to groups the records in the query with the hope of only getting the
    > six records from the primary query with related fields from the secondary
    > query the the "group by" does not work.
    >
    > help?
     

Share This Page