/***************************************
* function getNumDatamatrix
*
* calcola il numero dei datamatrix BUONI presenti in un gitterbox dalla view v_trasfDataMatrix 
*
* Steamware, S.E.L.
* mod: 2011.04.29
*
****************************************/
CREATE FUNCTION dbo.getNumDatamatrix
(
	@CodGitterbox AS NVARCHAR(50)
)
RETURNS INT
AS
	BEGIN
		DECLARE @answ AS INT
		SET @answ = (SELECT COUNT(*) FROM v_trasfDataMatrix WHERE CodGitterbox = @CodGitterbox)
		RETURN @answ
	END
