DROP PROCEDURE IF EXISTS uspIsCsengetesiRendNevExists 
GO
  CREATE PROCEDURE uspIsCsengetesiRendNevExists
     @pId INT
    ,@pNev NVARCHAR(50)
    ,@pTanevId INT
  AS
  BEGIN
    SET NOCOUNT ON;

    SELECT ID
    FROM T_CSENGETESIREND_OSSZES
    WHERE UPPER(C_NEV) = UPPER(@pNev)
      AND ID != @pId
      AND C_TANEVID = @pTanevId
      AND TOROLT = 'F'
  END
GO


