DROP PROCEDURE IF EXISTS uspCheckOrarendiOraOraszamIdopont 
GO

CREATE PROCEDURE uspCheckOrarendiOraOraszamIdopont
   @pIntezmenyId INT
  ,@pTanevId INT
  ,@pCsengetesiRendId INT
  ,@pOraszam INT
AS
BEGIN
  SET NOCOUNT ON;

  SELECT csro.C_KEZDETE AS Kezdet
    ,csro.C_VEGE AS Vege
  FROM T_CSENGETESIRENDORA_OSSZES csro
  WHERE csro.C_INTEZMENYID = @pIntezmenyId
    AND csro.C_TANEVID = @pTanevId
    AND csro.C_CSENGETESIRENDID = @pCsengetesiRendId
    AND csro.C_ORASZAM = @pOraszam
    AND csro.TOROLT = 'F'
END
GO


