Hi,
Have 10 applications with individual user tables.
I want to consolidate all applications with one user table.
[i know - should have done this from start]
My issue is the old user id is stored in the primary table and i need to replace with the new user id.
To do this i have added a new column to the old user table called newuserid and filled it with the newuserid's.
now i want to replace the old userid with the new userid in the primary table.
have tried with the following - am i on the right track ?
Have 10 applications with individual user tables.
I want to consolidate all applications with one user table.
[i know - should have done this from start]
My issue is the old user id is stored in the primary table and i need to replace with the new user id.
To do this i have added a new column to the old user table called newuserid and filled it with the newuserid's.
now i want to replace the old userid with the new userid in the primary table.
have tried with the following - am i on the right track ?
Code:
UPDATE primarytable
SET userid = newuserid
FROM users
WHERE users.userid = primarytable.userid