alter table hrsa_salary_sob_item add income_category nvarchar(100)
GO

alter table hrsa_salary_sob_item add constraint hssi_income_category_default default '1' for income_category
GO

update hrsa_salary_sob_item set income_category = '1' where salary_sob_id IN
(select id from hrsa_salary_sob where hrsa_salary_sob.income_category = '1')
GO

update hrsa_salary_sob_item set income_category = '2' where salary_sob_id IN
(select id from hrsa_salary_sob where hrsa_salary_sob.income_category = '2')
GO

update hrsa_salary_sob_item set income_category = '4' where salary_sob_id IN
(select id from hrsa_salary_sob where hrsa_salary_sob.income_category = '4')
GO

alter table hrsa_salary_sob_item add salary_item_code nvarchar(100)
GO

update a set a.salary_item_code = b.code from hrsa_salary_sob_item a, hrsa_salary_item b where a.salary_item_id = b.id
GO