SQL update from one Table to another based on a ID match

后端 未结 22 1343
太阳男子
太阳男子 2020-11-21 22:49

I have a database with account numbers and card numbers. I match these to a file to update any card numbers to the account number, so

22条回答
  •  無奈伤痛
    2020-11-21 23:21

    If above answers not working for you try this

    Update Sales_Import A left join RetrieveAccountNumber B on A.LeadID = B.LeadID
    Set A.AccountNumber = B.AccountNumber
    where A.LeadID = B.LeadID 
    

提交回复
热议问题