DROP PROCEDURE  IF EXISTS uspGetEgyediKovTanevSzotarelemIdByKovTanevIdAndAktTanevSzotarelemId 
GO
  CREATE PROCEDURE uspGetEgyediKovTanevSzotarelemIdByKovTanevIdAndAktTanevSzotarelemId
     @pId INT
    ,@pTanevId INT
  AS
  BEGIN
    SET NOCOUNT ON;
        SELECT ID
        FROM T_DICTIONARYITEMBASE_OSSZES
        WHERE ELOZOTANEVIREKORDID = @pId
          AND C_TANEVID = @pTanevId
          AND TOROLT = 'F'
    
  END
GO