DROP PROCEDURE IF EXISTS uspGetCsengetesiRendOraIdByIdAndOraszam
GO
  CREATE PROCEDURE uspGetCsengetesiRendOraIdByIdAndOraszam
     @pcsengRendId INT
    ,@poraszam INT
    ,@pTanevId INT
  AS
  BEGIN
    SET NOCOUNT ON;

    SELECT ID
    FROM T_CSENGETESIRENDORA_OSSZES
    WHERE C_CSENGETESIRENDID = @pcsengRendId
      AND C_ORASZAM = @poraszam
      AND Torolt = 'F'
      AND C_TANEVID = @pTanevId
  END
GO


