﻿DROP PROCEDURE IF EXISTS [dbo].[sp_UpdateErtesitesiDatum]
GO

CREATE PROCEDURE [dbo].[sp_UpdateErtesitesiDatum]
   @pUserId  INT
  ,@pNebuloId  INT
AS
BEGIN

  SET NOCOUNT ON;  

  DECLARE @currentDateTime DATETIME 
  SET @currentDateTime = (SELECT GETDATE())

  BEGIN
    UPDATE 
      T_NEBULO
    SET 
      C_ERTESITESDATUMA =          @currentDateTime
      
            ,C_IMPORTALT =            'F'
      ,SERIAL =              SERIAL + 1
      ,LASTCHANGED =            @currentDateTime
      ,MODIFIER =              @pUserId
    WHERE
      ID = @pNebuloId
  END

END

GO

