kreta/Kreta.DataAccess.Migrations/DBScripts/Database/dbo/Stored procedures/uspSetHazifeladatAsKikuldott.sql
2024-03-13 00:33:46 +01:00

26 lines
572 B
Transact-SQL
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

DROP PROCEDURE IF EXISTS uspSetHazifeladatAsKikuldott
GO
CREATE PROCEDURE uspSetHazifeladatAsKikuldott
@pHazifeladatIdListString nvarchar(max)
AS
BEGIN
SET NOCOUNT ON;
DECLARE @hazifeladatList TABLE(Id int NOT NULL PRIMARY KEY CLUSTERED)
INSERT INTO @hazifeladatList(Id)
SELECT VALUE FROM STRING_SPLIT(@pHazifeladatIdListString, ',')
UPDATE hf SET
C_ISERTESITESKIKULDVE = 'T'
,SERIAL = SERIAL + 1
,LASTCHANGED = GETDATE()
,MODIFIER = 0
FROM T_DKT_FELADAT hf
INNER JOIN @hazifeladatList item ON hf.ID = item.Id
END
GO