ALTER TABLE VS4TEmpUpSalaryMB
	DROP COLUMN TEUMEmployeeName, TEUMPositionName, TEUMDivisionName, TEUMType
GO
ALTER TABLE VS4TEmpUpSalaryMB ADD
	TEUMTEmTCode nvarchar(30) NULL,
	TEUMTDivCode nvarchar(30) NULL,
	TEUMTDepCode nvarchar(30) NULL,
	TEUMTSecCode nvarchar(30) NULL,
	TEUMTBraCode nvarchar(30) NULL,
	TEUMNewTEmTCode nvarchar(30) NULL,
	TEUMNewTDivCode nvarchar(30) NULL,
	TEUMNewTDepCode nvarchar(30) NULL,
	TEUMNewTSecCode nvarchar(30) NULL,
	TEUMNewTPstCode nvarchar(30) NULL,
	TEUMNewTBraCode nvarchar(30) NULL,
	TEUMChangeSalary smallint NULL,
	TEUMChangePosition smallint NULL,
	TEUMChangeType smallint NULL,
	TEUMChangeSection smallint NULL
GO
UPDATE VS4TEmpUpSalaryMB set TEUMChangeSalary=1 where TEUMChangeSalary is null
GO
UPDATE VS4TEmpUpSalaryMB set TEUMChangePosition=0 where TEUMChangePosition is null
GO
UPDATE VS4TEmpUpSalaryMB set TEUMChangeType=0 where TEUMChangeType is null
GO
UPDATE VS4TEmpUpSalaryMB set TEUMChangeSection=0 where TEUMChangeSection is null
GO
UPDATE VS4TEmpUpSalaryMB set TEUMTEmTCode=(SELECT TEmpTEmTCode FROM VS4TEmployee WHERE TEmpCode=TEuMTEmpCode) where TEUMTEmTCode is null
GO
UPDATE VS4TEmpUpSalaryMB set TEUMTPstCode=(SELECT TEmpTPstCode FROM VS4TEmployee WHERE TEmpCode=TEuMTEmpCode) where TEUMTPstCode is null
GO
UPDATE VS4TEmpUpSalaryMB set TEUMTBraCode=(SELECT TEmpTBraCode FROM VS4TEmployee WHERE TEmpCode=TEuMTEmpCode) where TEUMTBraCode is null
GO
UPDATE VS4TEmpUpSalaryMB set TEUMTDivCode=(SELECT TEmpTDivCode FROM VS4TEmployee WHERE TEmpCode=TEuMTEmpCode) where TEUMTDivCode is null
GO
UPDATE VS4TEmpUpSalaryMB set TEUMTDepCode=(SELECT TEmpTDepCode FROM VS4TEmployee WHERE TEmpCode=TEuMTEmpCode) where TEUMTDepCode is null
GO
UPDATE VS4TEmpUpSalaryMB set TEUMTSecCode=(SELECT TEmpTSecCode FROM VS4TEmployee WHERE TEmpCode=TEuMTEmpCode) where TEUMTSecCode is null
GO