USE [EnVisage]
GO

/****** Object:  StoredProcedure [dbo].[sp_DeleteResource]    Script Date: 9/30/2014 6:36:24 PM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO


CREATE PROCEDURE [dbo].[sp_DeleteResource] (@id uniqueidentifier)
AS
BEGIN
	begin transaction

	delete from Resource2Teams where ResourceId = @id
	delete from Resource2ExpenditureCategories where ResourceId = @id
	delete from ResourceAllocation where ResourceId = @id
	delete from Resource where Id = @id

	commit transaction
END

GO


