set xact_abort on go begin transaction go set ANSI_NULLS on go /*************************************** * STORED stp_celleLibereGetByIdxBlocco * * ottiene l'elenco delle posizioni LIBERE associate ad un dato blocco * * Steamware, S.E.L. * mod: 2010.06.02 * ****************************************/ create PROCEDURE stp_celleLibereGetByIdxBlocco ( @IdxBlocco INT ) AS SELECT Celle.IdxCella, Celle.CodCS, Celle.CodCella, Celle.IdxTipoCella, Celle.Descrizione, Celle.Attiva, Celle.IdxBlocco, Celle.X, Celle.Y, Celle.Z FROM Celle LEFT OUTER JOIN PosizioneUdcCorrente ON Celle.IdxCella = PosizioneUdcCorrente.IdxCella WHERE (Celle.IdxBlocco = @IdxBlocco) AND (Celle.Attiva = 1) AND (PosizioneUdcCorrente.IdxCella IS NULL) RETURN go /*************************************** * STORED stp_celleNonAttiveByIdxBlocco * * ottiene l'elenco delle posizioni NON ATTIVE associate ad un dato blocco * * Steamware, S.E.L. * mod: 2010.06.03 * ****************************************/ create PROCEDURE stp_celleNonAttiveByIdxBlocco ( @IdxBlocco INT ) AS SELECT Celle.IdxCella, Celle.CodCS, Celle.CodCella, Celle.IdxTipoCella, Celle.Descrizione, Celle.Attiva, Celle.IdxBlocco, Celle.X, Celle.Y, Celle.Z FROM Celle WHERE (Celle.IdxBlocco = @IdxBlocco) AND (Celle.Attiva = 0) RETURN go commit go -- registro versione... INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(81, GETDATE()) GO