Merge columns from two tables (1 Viewer)

fboehlandt

Registered User.
Local time
Today, 22:23
Joined
Sep 5, 2008
Messages
90
Hi everyone

I am trying to complement data from one table with data from another.

Table 1
[Key][Customer_Name][Address][Phone_Number]

Table 2
[Key][Customer_Name][Address][Phone_Number]

I would like to update the details (Address, Phone Number) in Table 1 using the data in Table 2. However, the data in Table 1 should only be overwritten if there is data in Table 2.

I am sure this is pretty straight-forward but any pointers would be appreciated.
 

Ranman256

Well-known member
Local time
Today, 15:23
Joined
Apr 9, 2015
Messages
4,337
join the 2 tables on KEY,
update table2.[Phone_Number]
from table1.[Phone_Number]
where table2.[Phone_Number] is not null
 

Users who are viewing this thread

Top Bottom