update vs4tuser set tusrTEmpCode=(select tempcode from vs4temployee where tempcode=tusrtempcode)
GO
update vs4tuser set tusrTEmpCode='' where tusrTEmpCode is null
GO
update vs4tuser set tusrowner=0 where tusrowner is null
GO
insert into VS4TUserEmployee 
SELECT TUsrID,TEmpCode,TUsrFlag1,TUsrFlag2,TUsrFlag1 FROM VS4TUser INNER JOIN VS4TEmployee ON TUsrTEmpCode = TEmpCode
GO