Torna al Thread
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER PROCEDURE [dbo].[spRegConspumption]
@consumptionSampleCode varchar(50),
@consumptionTestCode varchar(50),
@objectID int,
@lotID int,
@consumptionConsumedUnits smallint,
@consumptionExecutionDate smalldatetime,
@consumptionCurve XML,
@consumptionReason smallint,
@cID int OUTPUT
AS
BEGIN
DECLARE @InsertTable table (cID int)
INSERT INTO Consumption VALUES (@consumptionSampleCode, @consumptionTestCode, @objectID, @lotID, @consumptionConsumedUnits,
@consumptionExecutionDate, @consumptionCurve, @consumptionReason)
SELECT cID=SCOPE_IDENTITY()
RETURN @cID
END