
GO
/****** Object:  StoredProcedure [sp_GetNemKotottMunkaIdoIdByDelete]    Script Date: 2016.10.12. 9:50:26 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [sp_GetNemKotottMunkaIdoIdByDelete]
	@IntezmenyId int
	,@TanevId int
	,@IdoszakKezdete datetime
	,@IdoszakVege datetime
	,@GroupId nvarchar(36)
AS
BEGIN
	SET NOCOUNT ON;

	SELECT
		nkm.ID
	FROM T_NEMKOTOTTMUNKAIDO nkm
	WHERE
		C_GROUPID = @GroupId AND C_INTEZMENYID = @IntezmenyId AND C_TANEVID = @TanevId AND TOROLT = 'F'
		AND nkm.C_KEZDETE BETWEEN @IdoszakKezdete AND @IdoszakVege

END