use EnVisage begin tran if exists (select 1 from sys.all_columns where name like 'WeekOrdinal' and object_id = OBJECT_ID('PeopleResourceAllocation')) begin alter table PeopleResourceAllocation drop column [WeekOrdinal] EXEC sp_rename 'PeopleResourceAllocation.ResourceId', 'PeopleResourceId', 'COLUMN'; end commit tran