Update/Append?? Help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to know if there is a way that you can update a table's fields
(tbl 1) with the data from another table (tbl 2). I do not want to "append",
because I do not want to add records. I want to fill the fields that are
empty in tble 1 with the data that is in tble 2. The tables are the same
with the same fields and same type of data being entered. I tried to do an
"Update" and I do not want to override what is tble 1 if there is already
data in the fields. I just want to fill tble 1 fields that are empty with
data from tble 2. Any help will be greatly appreciated. Thank you.
 
TotallyConfused said:
I would like to know if there is a way that you can update a table's fields
(tbl 1) with the data from another table (tbl 2). I do not want to "append",
because I do not want to add records. I want to fill the fields that are
empty in tble 1 with the data that is in tble 2. The tables are the same
with the same fields and same type of data being entered. I tried to do an
"Update" and I do not want to override what is tble 1 if there is already
data in the fields. I just want to fill tble 1 fields that are empty with
data from tble 2. Any help will be greatly appreciated. Thank you.


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

UPDATE table1 As T1 INNER JOIN table2 As T2
ON T1.id_column = T2.id_column
SET T1.col1 = Nz(T1.col1,T2.col1),
T1.col2 = Nz(T1.col2,T2.col2),
.... etc. ...

Make sure you join on the primary key column(s).
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

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

iQA/AwUBRAUljYechKqOuFEgEQISmgCfRgvuro/+qyIK1IzNUA0eJoOiNGMAoLcK
KN8zUuSKj0UbhhmzI73z4D9N
=TRrK
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top