user2740866
user2740866

Reputation: 1

Need to upate data in table from data in another

I have two tables and need to update ClientInfo with ServiceLocation information from EligibleServices table

**Table: EligibleServices**   

ChartNumber
-----------
1
2
3    

ServiceLocation
---------------
Office1
Office2
Office3

**Table: ClientInfo**

Chartnumber
-----------
1
2
3

ServiceLocation
---------------

Upvotes: 0

Views: 43

Answers (1)

Gordon Linoff
Gordon Linoff

Reputation: 1270021

You can do an update with a join:

update clientinfo ci join
       eligibleservices es
       on ci.ChartNumber = es.ChartNumber
    set ci.ServiceLocation = es.ServiceLocation;

Upvotes: 1

Related Questions