|
|
USE [Vertragsverwaltung_20160404]
|
|
|
GO
|
|
|
/****** Object: StoredProcedure [dbo].[pr_MADetails_Insert] Script Date: 02.12.2016 09:08:54 ******/
|
|
|
DROP PROCEDURE [dbo].[pr_MADetails_Insert]
|
|
|
GO
|
|
|
/****** Object: StoredProcedure [dbo].[pr_MADetails_Insert] Script Date: 02.12.2016 09:08:54 ******/
|
|
|
SET ANSI_NULLS ON
|
|
|
GO
|
|
|
SET QUOTED_IDENTIFIER ON
|
|
|
GO
|
|
|
|
|
|
|
|
|
---------------------------------------------------------------------------------
|
|
|
-- Stored procedure that will insert 1 row in the table 'MADetails'
|
|
|
-- Gets: @iMADetailNr int
|
|
|
-- Gets: @iMANr int
|
|
|
-- Gets: @iMitarbeiterTypNr int
|
|
|
-- Gets: @iOENr int
|
|
|
-- Gets: @iEngagement int
|
|
|
-- Gets: @daGueltig_ab datetime
|
|
|
-- Gets: @sBemerkung varchar(1024)
|
|
|
-- Gets: @bAktiv bit
|
|
|
-- Gets: @daErstellt_am datetime
|
|
|
-- Gets: @daMutiert_am datetime
|
|
|
-- Gets: @iMutierer int
|
|
|
-- Gets: @iIndividuelle_Reduktion int
|
|
|
-- Gets: @sIndividuelle_Reduktion_Bemerkung varchar(1024)
|
|
|
-- Gets: @iPlanwert_Anteil_RTB_Person int
|
|
|
-- Returns: @iErrorCode int
|
|
|
---------------------------------------------------------------------------------
|
|
|
CREATE PROCEDURE [dbo].[pr_MADetails_Insert]
|
|
|
@iMADetailNr int,
|
|
|
@iMANr int,
|
|
|
@iMitarbeiterTypNr int,
|
|
|
@iOENr int,
|
|
|
@iEngagement int,
|
|
|
@daGueltig_ab datetime,
|
|
|
@sBemerkung varchar(1024),
|
|
|
@bAktiv bit,
|
|
|
@daErstellt_am datetime,
|
|
|
@daMutiert_am datetime,
|
|
|
@iMutierer int,
|
|
|
@iIndividuelle_Reduktion int,
|
|
|
@sIndividuelle_Reduktion_Bemerkung varchar(1024),
|
|
|
@iPlanwert_Anteil_RTB_Person int,
|
|
|
@iErrorCode int OUTPUT
|
|
|
AS
|
|
|
SET NOCOUNT ON
|
|
|
-- INSERT a new row in the table.
|
|
|
INSERT [dbo].[MADetails]
|
|
|
(
|
|
|
[MADetailNr],
|
|
|
[MANr],
|
|
|
[MitarbeiterTypNr],
|
|
|
[OENr],
|
|
|
[Engagement],
|
|
|
[Gueltig_ab],
|
|
|
[Bemerkung],
|
|
|
[Aktiv],
|
|
|
[Erstellt_am],
|
|
|
[Mutiert_am],
|
|
|
[Mutierer],
|
|
|
[Individuelle_Reduktion],
|
|
|
[Individuelle_Reduktion_Bemerkung],
|
|
|
[Planwert_Anteil_RTB_Person]
|
|
|
)
|
|
|
VALUES
|
|
|
(
|
|
|
@iMADetailNr,
|
|
|
@iMANr,
|
|
|
@iMitarbeiterTypNr,
|
|
|
@iOENr,
|
|
|
@iEngagement,
|
|
|
@daGueltig_ab,
|
|
|
@sBemerkung,
|
|
|
@bAktiv,
|
|
|
@daErstellt_am,
|
|
|
@daMutiert_am,
|
|
|
@iMutierer,
|
|
|
@iIndividuelle_Reduktion,
|
|
|
@sIndividuelle_Reduktion_Bemerkung,
|
|
|
@iPlanwert_Anteil_RTB_Person
|
|
|
)
|
|
|
-- Get the Error Code for the statement just executed.
|
|
|
SELECT @iErrorCode=@@ERROR
|
|
|
|
|
|
|
|
|
GO
|