views:

36

answers:

2

I have two MS Access tables:

tableA

num   state
1     12
2     13
1     11
3     12

tableB

num   stateA   stateB
1      12      11
1      12      11
2      13      12
2      12      11
1      12      11
1      15      11 
3      12      11

How can I create a third table which will have only one column num - appended from two tables ... other columns from two tables ignored:

tableC
num
1
2
1
3
1
1
2
2
1
1
3

Any help appreciated.

+1  A: 

Try something like this

SELECT tableA.num
FROM tableA
UNION ALL
SELECT tableB.num
FROM tableB
astander
Change it to tableB in the second select and I'll give you the deserved vote (-:
Murph
Thanx, sorry about that.
astander
+1  A: 

To create a new table, the Union query above can be used as a subquery:

SELECT x.Num  INTO New  FROM (
   SELECT tableA.num
   FROM tableA
   UNION ALL
   SELECT tableB.num
   FROM tableB ) As x
Remou