﻿DROP PROCEDURE IF EXISTS uspDeleteEgyediNap
GO

CREATE PROCEDURE uspDeleteEgyediNap
	@pTanevRendjeId int
AS BEGIN
  SET NOCOUNT ON
	
	DECLARE @napDatuma datetime
	SELECT @napDatuma = C_DATUM FROM T_TANEVRENDJE_OSSZES WHERE ID = @pTanevRendjeId
	
	UPDATE T_ORARENDIORA
	SET
		TOROLT= 'T'
	WHERE
		C_EGYEDINAP = 'T' AND C_ORAERVENYESSEGKEZDETE = @napDatuma AND C_ORAERVENYESSEGVEGE = @napDatuma

END