﻿USE [FabApprovalSystem]
GO
	/****** Object:  StoredProcedure [dbo].[MRBDelete]    Script Date: 11/21/2024 11:29:05 AM ******/
SET
	ANSI_NULLS ON
GO
SET
	QUOTED_IDENTIFIER ON
GO
	CREATE PROCEDURE [dbo].[MRBDelete] @MRBNumber INT AS
DELETE FROM
	MRBLot
WHERE
	MRBNumber = @MRBNumber
DELETE FROM
	MRBAttachment
WHERE
	MRBNumber = @MRBNumber
DELETE FROM
	MRBContainmentAction
WHERE
	MRBNumber = @MRBNumber
DELETE FROM
	MRBPartGroupAffected
WHERE
	MRBNumber = @MRBNumber
DELETE FROM
	MRBModuleByMRB
WHERE
	MRBNumber = @MRBNumber
DELETE FROM
	MRBDispositionByMRB
WHERE
	MRBNumber = @MRBNumber
DELETE FROM
	MRBRiskAssessmentByMRB
WHERE
	MRBNumber = @MRBNumber
DELETE FROM
	MRB
WHERE
	MRBNumber = @MRBNumber
DELETE FROM
	MRBLotsToBeSentToSPN
WHERE
	MRBNumber = @MRBNumber
GO