You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
3.4 KiB
56 lines
3.4 KiB
USE [Vertragsverwaltung_20160404]
|
|
GO
|
|
/****** Object: StoredProcedure [dbo].[pr_History_Update] Script Date: 02.12.2016 09:08:54 ******/
|
|
DROP PROCEDURE [dbo].[pr_History_Update]
|
|
GO
|
|
/****** Object: StoredProcedure [dbo].[pr_History_Update] Script Date: 02.12.2016 09:08:54 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
|
|
---------------------------------------------------------------------------------
|
|
-- Stored procedure that will update an existing row in the table 'History'
|
|
-- Gets: @iHistoryNr int
|
|
-- Gets: @iHistoryTypNr int
|
|
-- Gets: @sHistoryObject varchar(50)
|
|
-- Gets: @sHistoryObjekctKey varchar(50)
|
|
-- Gets: @sHistoryObjectDetails varchar(50)
|
|
-- Gets: @sAlter_Wert varchar(50)
|
|
-- Gets: @sNeuer_Wert varchar(50)
|
|
-- Gets: @daErstellt_am datetime
|
|
-- Gets: @iMutierer int
|
|
-- Returns: @iErrorCode int
|
|
---------------------------------------------------------------------------------
|
|
CREATE PROCEDURE [dbo].[pr_History_Update]
|
|
@iHistoryNr int,
|
|
@iHistoryTypNr int,
|
|
@sHistoryObject varchar(50),
|
|
@sHistoryObjekctKey varchar(50),
|
|
@sHistoryObjectDetails varchar(50),
|
|
@sAlter_Wert varchar(50),
|
|
@sNeuer_Wert varchar(50),
|
|
@daErstellt_am datetime,
|
|
@iMutierer int,
|
|
@iErrorCode int OUTPUT
|
|
AS
|
|
SET NOCOUNT ON
|
|
-- UPDATE an existing row in the table.
|
|
UPDATE [dbo].[History]
|
|
SET
|
|
[HistoryTypNr] = @iHistoryTypNr,
|
|
[HistoryObject] = @sHistoryObject,
|
|
[HistoryObjekctKey] = @sHistoryObjekctKey,
|
|
[HistoryObjectDetails] = @sHistoryObjectDetails,
|
|
[Alter_Wert] = @sAlter_Wert,
|
|
[Neuer_Wert] = @sNeuer_Wert,
|
|
[Erstellt_am] = @daErstellt_am,
|
|
[Mutierer] = @iMutierer
|
|
WHERE
|
|
[HistoryNr] = @iHistoryNr
|
|
-- Get the Error Code for the statement just executed.
|
|
SELECT @iErrorCode=@@ERROR
|
|
|
|
|
|
GO
|