USE EnVisage

BEGIN TRAN
	if exists (select 1 from sys.indexes where name='DF_PeopleResource_Unique_Email')
	begin
		drop index DF_PeopleResource_Unique_Email on PeopleResource
	end

	CREATE UNIQUE NONCLUSTERED INDEX DF_PeopleResource_Unique_Email
	ON PeopleResource(Email)
	WHERE Email IS NOT NULL
COMMIT TRAN