﻿-- =============================================
-- Description:	<Előszedjük a súly id-ját az értékelés mód alapján>
-- =============================================
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

DROP PROCEDURE IF EXISTS [dbo].[uspGetSulyIdByErtekelesMod]
GO

CREATE PROCEDURE [dbo].[uspGetSulyIdByErtekelesMod]
	 @pTanevId			INT
	,@pErtekelesModId	INT
AS
BEGIN

	-- SET NOCOUNT ON added to prevent extra result sets frominterfering with SELECT statements.
	SET NOCOUNT ON;

	SELECT TOP 1
		TanariAtlagSuly.ID
	FROM
		T_TANARIATLAGSULY_OSSZES TanariAtlagSuly
	WHERE
			TanariAtlagSuly.C_TANEVID			= @pTanevId
		AND TanariAtlagSuly.TOROLT				= 'F'		
		AND	TanariAtlagSuly.C_ERTEKELESMODID	= @pErtekelesModId

END


GO

