Our business is changing the current employee UserId's to a new value. I am trying to build a query that will read the current user table, find the matching row in the new user table & update the existing userID with the value of the new userID in the new table. I want the query to run against all the rows to do the updates.
I have tried to build an 'update' query that would read the 'strUserID' from tblUsers and grab the matching 'strUserID' from the tblUsersNew and update tblUsers.strUse rID with the new userID value tblUsersNew.new UserID. Here is my query:
I am recieving the error in the attachment.
I have tried to build an 'update' query that would read the 'strUserID' from tblUsers and grab the matching 'strUserID' from the tblUsersNew and update tblUsers.strUse rID with the new userID value tblUsersNew.new UserID. Here is my query:
Code:
UPDATE tblUsers SET strUserID = (Select newUserID from tblUsersNew where tblUsers.strUserID = tblUsersNew.NewUserID)
Comment