if I have these two tables :
Table1
AID1____________FID____________value1
1------------1----------12
7------------2-----------1
8------------1-----------1
Table2
AID2____________FID____________value2
7------------1----------3.3
When I execute the following query :
Select table1.value1, table2.value2, table1.AID1, table2.AID2
from table1,table2
where table1.FID = 1 or table2.FID = 1
I get :
value1_____________Value2_____AID1______AID2
12----------------- 3.3--------1--------7
1------------------3.3---------7--------7
1------------------3.3---------8---------7
But this is not the desired output, because some values should be NULL, but what I get is values doubled ! Can anyone help ?
This is my desired output : value1______Value2_AID1___AID2
12----------------- 3.3--------1--------7
1------------------NULL---------7--------NULL
1------------------NULL---------8---------NULL