Compare two query

aamir

Guppy
Please help me this issue........
I m working in Ms-Access 2003.

i make two query:

first query is given below:
eg. productcode cost n1
10001 10 2
10001 10 5
10001 30 7
10001 40 9
10001 50 1

second is given below:
eg. productcode cost n2
10001 10 11
10001 10 6
10001 30 7
10001 40 10
10001 50 2

my problem is when i join two query and run it give six rows but i need five row :

eg. productcode cost n1 n2
10001 10 2 11
10001 10 5 6
10001 30 7 7
10001 40 9 10
10001 50 1 2

above result should come ..............

but i get more rows ,extra row of repeating cost 10.this is wrong.
productcode cost n1 n2
10001 10 2 11
10001 10 2 11
10001 10 5 6
10001 10 5 6
10001 30 7 7
10001 40 9 10
10001 50 1 2


there is no primary key required according to my query so i not put any primary to my tables.


please give me solution as soon as possible.........

thanks in advance.
 
we have two table with same field .

First table is productcode cost n1
eg. productcode cost n1
10001 10 2
10001 10 5
10001 30 7
10001 40 9
10001 50 1

second table is productcode cost n2

eg. productcode cost n2
10001 10 11
10001 10 6
10001 30 7
10001 40 10
10001 50 2

my problem is when i join two table and run it give more rows but i need five row :

eg. productcode cost n1 n2
10001 10 2 11
10001 10 5 6
10001 30 7 7
10001 40 9 10
10001 50 1 2

Please tell me how to make query to give same result as above.
 
Back
Top