EnVisageOnline/Main/Database/Scripts/20141222/03_Alter_Table_PeopleResour...

10 lines
324 B
SQL

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