Files
GMW/GMW_data/SqlScripts/V1.1/GMW_00081.sql
T
Samuele E. Locatelli bdd7b413e8 Riaggiunto GMW_data
2016-11-22 17:58:00 +01:00

65 lines
1.4 KiB
Transact-SQL

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