﻿-- =============================================
-- Description:	<Előszedjük a súly adatokat>
-- =============================================
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

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

CREATE PROCEDURE [dbo].[uspGetSulyData]
	@pTanevId	INT
AS
BEGIN

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

	SELECT
		 tanariAtlagSuly.ID                  Id
		,tanariAtlagSuly.C_SULY              Suly
		,tanariAtlagSuly.C_ERTEKELESMODID    ErtekelesModId
	FROM
		T_TANARIATLAGSULY_OSSZES tanariAtlagSuly
	INNER JOIN
		T_DICTIONARYITEMBASE_OSSZES ertekelesModDictionary ON 
				ertekelesModDictionary.ID = tanariAtlagSuly.C_ERTEKELESMODID
			AND ertekelesModDictionary.C_TANEVID = tanariAtlagSuly.C_TANEVID
			AND ertekelesModDictionary.TOROLT = 'F'
	WHERE
			tanariAtlagSuly.C_TANEVID = @pTanevId
		AND tanariAtlagSuly.TOROLT = 'F'

END


GO

