Join dropping records

  • Thread starter Thread starter CMB
  • Start date Start date
C

CMB

I have two tables that both have records that are not in the other. I want
to keep all the records from both tables....How do I do this?

Thank you!
 
CMB said:
I have two tables that both have records that are not in the other. I want
to keep all the records from both tables....How do I do this?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You don't say what you want to do w/ the data....

Here's is how you can see both data in one query:

SELECT <the columns in the table>
FROM table1

UNION ALL

SELECT <the columns in the table>
FROM table2

Be sure to have the same number of columns in each SELECT statement (w/
the same data types).

If you want to put all the data into one new table, just wrap a Make
Table query around the Union query:

SELECT <column list>
INTO NewTableName
FROM (
SELECT <the columns in the table>
FROM table1

UNION ALL

SELECT <the columns in the table>
FROM table2
) AS A

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBRDWy/IechKqOuFEgEQKoRwCfU7ZT4Ih8frJ6XMdZxZP/yQG/AWMAn1Cf
1Ps5SwpMDaTIjfSeD5cQ3kKO
=nBbY
-----END PGP SIGNATURE-----
 
Back
Top