Duplicate in query

  • Thread starter Thread starter Guest
  • Start date Start date
G

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?
 
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
 
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?
 
Back
Top