EnVisageOnline/Main/Database/Scripts/20160216/09_sp_DeletePeopleResource_...

34 lines
1.4 KiB
Transact-SQL
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

USE [EnVisage]
GO
/****** Object: StoredProcedure [dbo].[sp_DeletePeopleResource] Script Date: 2/16/2016 10:04:12 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[sp_DeletePeopleResource] (@id uniqueidentifier)
AS
BEGIN
begin transaction
delete from Holiday2PeopleResource where ResourceId = @id
delete from NonProjectTimeAllocation 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