I'm trying to update a table in my SQL Server DB. I'm trying to do it in the simplest way possible but not sure of the syntax or if it's possible for what I want to do. Here is what I have. Visually, the columns being updated don't match but I'm changing the column name and type once the data is converted.
UPDATE Transactions B
SET B.acctName = (SELECT acctID FROM Accounts WHERE acctName = B.acctName)
This is what I'm trying to accomplish but the syntax is rejected.