"John" <Jo**@nospam.infovis.co.ukwrote in
news:Bc********************@pipex.net:
Hi
I have two tables with two columns each. Each table has an id
column and a value column. I would like the two tables to be
merged so there are three columns id, valuefromtable1 and
valuefromtable2 and in such as way that all records from both
tables are included but where they don't match the
corresponding valuefromtable1 or valuefromtable2 is empty. How
can I go about doing this?
Thanks
Regards
You create a full outer join query. In Access, this has to be
simulated with a left join and a right join.
Begin by opening the query builder.
add the two tables, and
add a relationship between the ID columns.
Add the three fields.
Switch the query to SQL view.
Select all. and
paste the text back into the query a second time.
Change the semicolon that's in between the two statements to
UNION with a space on each side of it.
now find first instance of the words INNER JOIN
Change them to LEFT JOIN.
Find the second instance of the words INNER JOIN
Change them to RIGHT JOIN.
Save the query.
Run it.
copy and paste the results into your new table.
Sigh a sigh of relief, you're done.
--
Bob Quintal
PA is y I've altered my email address.
--
Posted via a free Usenet account from
http://www.teranews.com