Account and credit card numbers are stored in a database I hold. To ensure that I am just working with account numbers, I compare these to a file and update any card numbers to the account number.
I built a view connecting the table to the account/card database to return the Table ID and associated account number. Now I need to update the records where the ID and account number match.
The account number field in the Sales Import database needs to be modified.
And this is the RetrieveAccountNumber table, where I need to update from:
I tried the below, but no luck so far:
SET [AccountNumber] = (SELECT RetrieveAccountNumber.AccountNumber
WHERE [Sales_Lead].[dbo].[Sales_Import]. LeadID =
It updates the card numbers to account numbers, but the account numbers get replaced by NULL