USE [EnVisage]
GO

ALTER PROCEDURE [dbo].[sp_DeletePeopleResource] (@id uniqueidentifier)
AS
BEGIN
	begin transaction

	delete from PeopleResourceTraining where PeopleResourceId = @id
	delete from PeopleResourceVacation where PeopleResourceId = @id
	delete from PeopleResourceAllocation where PeopleResourceId = @id
	delete from Skill2Resource where ResourceId = @id
	delete from PeopleResource where Id = @id

	commit transaction
END
GO


