﻿USE [FabApprovalSystem]
GO
	/****** Object:  StoredProcedure [dbo].[_8DSubmitForSectionApproval]    Script Date: 11/21/2024 11:29:04 AM ******/
SET
	ANSI_NULLS ON
GO
SET
	QUOTED_IDENTIFIER ON
GO
	-- =============================================
	-- Author:		<Author,,Name>
	-- Create date: <Create Date,,>
	-- Description:	<Description,,>
	-- =============================================
	CREATE PROCEDURE [dbo].[_8DSubmitForSectionApproval] -- Add the parameters for the stored procedure here
	@CANo INT,
	@8DQAUserID INT,
	@DSection VARCHAR(50) AS BEGIN
SET
	NOCOUNT ON;

--Delete any identical existing approvals
--DELETE FROM _8DSectionApproval WHERE CaNo = @CANo AND DSection = @DSection
INSERT INTO
	_8DSectionApproval (
		DSection,
		UserId,
		CaNo,
		DateAssigned,
		DateNotified
	)
VALUES
	(
		@DSection,
		@8DQAUserID,
		@CANo,
		GETDATE(),
		GETDATE()
	)
END
GO