kreta/Kreta.DataAccess.Migrations/Scripts/Archive/20180704160547_HOI2016_Build/sp_UpdateErtesitesiDatum.sql
2024-03-13 00:33:46 +01:00

43 lines
783 B
Transact-SQL

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF OBJECT_ID('[dbo].[sp_UpdateErtesitesiDatum]') IS NOT NULL
BEGIN
DROP PROCEDURE [dbo].[sp_UpdateErtesitesiDatum]
END
GO
CREATE PROCEDURE [dbo].[sp_UpdateErtesitesiDatum]
-- Add the parameters for the stored procedure here
@pUserId INT
,@pNebuloId INT
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
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