63 lines
1.4 KiB
Transact-SQL
63 lines
1.4 KiB
Transact-SQL
USE [FabApprovalSystem]
|
|
GO
|
|
/****** Object: StoredProcedure [dbo].[InsertLotDisposition] 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].[InsertLotDisposition] @IssueID INT OUT,
|
|
@IssueDescription VARCHAR(2000),
|
|
@Title NVARCHAR(50),
|
|
@PERequired BIT,
|
|
@ResponsibilityID INT,
|
|
@IssueDate DATETIME,
|
|
@OriginatorID INT,
|
|
@ReasonForDisposition VARCHAR(3000),
|
|
@ResponsibilityIssueID INT,
|
|
@SPNScrapCode VARCHAR(25),
|
|
@CurrentStep INT AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from
|
|
-- interfering with SELECT statements.
|
|
SET
|
|
NOCOUNT ON;
|
|
|
|
-- Insert statements for procedure here
|
|
/****** Script for SelectTopNRows command from SSMS ******/
|
|
INSERT INTO
|
|
LotDisposition (
|
|
IssueDescription,
|
|
Title,
|
|
PERequired,
|
|
ResponsibilityID,
|
|
IssueDate,
|
|
OriginatorID,
|
|
ReasonForDisposition,
|
|
ResponsibilityIssueID,
|
|
SPNScrapCode,
|
|
CurrentStep,
|
|
LastUpdateDate
|
|
)
|
|
VALUES
|
|
(
|
|
@IssueDescription,
|
|
@Title,
|
|
@PERequired,
|
|
@ResponsibilityID,
|
|
@IssueDate,
|
|
@OriginatorID,
|
|
@ReasonForDisposition,
|
|
@ResponsibilityIssueID,
|
|
@SPNScrapCode,
|
|
@CurrentStep,
|
|
GETDATE()
|
|
)
|
|
SET
|
|
@IssueID = CAST(SCOPE_IDENTITY() AS INT)
|
|
END
|
|
GO |