I have two table Import and Export. They have multiple columns but I have picked Import Style(I_S), Import Color(I_C) and Import Quantity(I_Q) as well as Export Style(E_S), Export Color(E_C) and Export Quantity(E_Q) to show what I want to accomplish.
The tables have no PK or FK and the only relationship is by dragging I_S and dumping it on E_S and the same with I_C and E_C.
Now I want to match my data and retrieve the ones that have the same I_S and I_C in the Import table with the same E_S and E_C in Export table.
I do get my result but I have designed it so I get the result in two queries.
Does anyone know how to brig these two queries together so I can get the result like so;
I_S I_C I_Q E_S E_C E_Q
============================================
A42 Multi 15 A42 Metallic 15
A42 Multi 360 A42 Multi 15
A42 Metallic 210 A42 Multi 30
*** **** *** A42 Multi 15
*** **** *** A42 Multi 15
*** **** *** A42 Multi 15
*** ***** *** A42 Metallic 15
B33 Black 85 B33 Black 10
instead of;
I_S I_C I_Q E_S E_C E_Q
============================================
A42 Multi 15 A42 Metallic 15
A42 Multi 360 A42 Multi 15
A42 Metallic 210 A42 Multi 30
B33 Black 85 A42 Multi 15
A42 Multi 15
A42 Multi 15
A42 Metallic 15
B33 Black 10
Any ideas?
The tables have no PK or FK and the only relationship is by dragging I_S and dumping it on E_S and the same with I_C and E_C.
Now I want to match my data and retrieve the ones that have the same I_S and I_C in the Import table with the same E_S and E_C in Export table.
I do get my result but I have designed it so I get the result in two queries.
Does anyone know how to brig these two queries together so I can get the result like so;
I_S I_C I_Q E_S E_C E_Q
============================================
A42 Multi 15 A42 Metallic 15
A42 Multi 360 A42 Multi 15
A42 Metallic 210 A42 Multi 30
*** **** *** A42 Multi 15
*** **** *** A42 Multi 15
*** **** *** A42 Multi 15
*** ***** *** A42 Metallic 15
B33 Black 85 B33 Black 10
instead of;
I_S I_C I_Q E_S E_C E_Q
============================================
A42 Multi 15 A42 Metallic 15
A42 Multi 360 A42 Multi 15
A42 Metallic 210 A42 Multi 30
B33 Black 85 A42 Multi 15
A42 Multi 15
A42 Multi 15
A42 Metallic 15
B33 Black 10
Any ideas?