1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| CREATE PROCEDURE ProcValideGenSB
@numSB varchar(25), @revSB varchar(10), @titre varchar(300), @revision smalldatetime, @effectivite smalldatetime, @reception smalldatetime,
@etops char(1), @shop char(1), @wing char(1), @refCred varchar(50), @dateCred smalldatetime, @description varchar(500), @avantage varchar(500),
@interchange varchar(500), @commentaire varchar(500), @duree char(1), @performance char(1), @fiabilite char(1), @inspection char(1), @autre varchar(2),
@Sprod integer
AS
BEGIN TRANSACTION VALIDE_GEN_SB
DECLARE @IDSB integer
INSERT INTO SB (NUMERO, REVISION, TITRE, DATE_PARUTION, DATE_EFFECTIVITE, DATE_RECEPTION, ETOPS, ON_SHOP, ON_WING, REF_CREDIT, DATE_FIN_CREDIT,
[DESCRIPTION], AVANTAGES, INTERCHANGABILITEE, COMMENTAIRES, DUREE, PERFORMANCE, FIABILITE, INSPECTION, AUTRE, ID_S_PROD)
VALUES(@numSB, @revSB, @titre, @revision, @effectivite, @reception, @etops, @shop, @wing, @refCred, @dateCred, @description, @avantage, @interchange,
@commentaire, @duree, @performance, @fiabilite, @inspection, @autre, @Sprod);
SELECT @IDSB = @@identity;
INSERT INTO Reprise(IDENT_SB, QUOI) VALUES(@IDSB, 'SB');
SELECT IDENT_SB FROM Reprise WHERE IDENT_SB = @IDSB AND QUOI = 'SB';
COMMIT TRANSACTION VALIDE_GEN_SB
RETURN |
Partager