Files
GMW/GMW_DB/dmtx/Stored Procedures/stp_verificaDtx.sql
T
2014-03-21 10:20:06 +01:00

26 lines
572 B
Transact-SQL

/*************************************************
* STORED stp_verificaDtx
*
* verifica il DataMatrix se presente nella tab dei cartellini acquisiti ed OK
*
* Steamware, S.E.L.
* mod: 2014.03.07
*
*************************************************/
CREATE PROCEDURE [dmtx].[stp_verificaDtx]
(
@DataMatrix NVARCHAR(50)
-- ,@Esito NVARCHAR(5) OUTPUT
)
AS
-- resetto esito!
DECLARE @Esito NVARCHAR(5) = NULL
-- calcolo!
SELECT @Esito = EsitoMarcatura
FROM dmtx.v_ElencoDataMatrixBMW AS Dtx
WHERE DataMatrix = @DataMatrix
SELECT ISNULL(@Esito,'ND') as StatoDtx
RETURN