USE [EnVisage] GO if exists (select 1 from sys.all_objects where name like 'sp_DeletePeopleResource') begin DROP PROCEDURE [dbo].[sp_DeletePeopleResource] end GO CREATE PROCEDURE [dbo].[sp_DeletePeopleResource] (@id uniqueidentifier) AS BEGIN begin transaction delete from PeopleResourceVacation where PeopleResourceId = @id delete from PeopleResourceAllocation where PeopleResourceId = @id delete from PeopleResource where Id = @id commit transaction END GO