This commit is contained in:
skidoodle 2024-03-13 00:33:46 +01:00
commit e124a47765
19374 changed files with 9806149 additions and 0 deletions

View file

@ -0,0 +1,31 @@
DECLARE @Id int, @tanevId int, @intezmenyId int
DECLARE fb_cursor CURSOR FOR
SELECT ID, C_INTEZMENYID, C_TANEVID
FROM T_FELHASZNALO_OSSZES
WHERE C_TANEVID IN (
SELECT ID
FROM T_TANEV_OSSZES
WHERE C_NEV = '2017/2018')
AND C_UTONEV = 'Adminisztrátor'
OPEN fb_cursor
FETCH NEXT FROM fb_cursor
INTO @Id, @intezmenyId, @tanevId
WHILE @@FETCH_STATUS = 0
BEGIN
UPDATE T_FELHASZNALOBELEPES_OSSZES
SET C_FELHASZNALOID = @Id
WHERE C_TANEVID = @tanevId
AND C_INTEZMENYID = @intezmenyId
AND C_BEJELENTKEZESINEV = 'admin'
FETCH NEXT FROM fb_cursor
INTO @Id, @intezmenyId, @tanevId
END
CLOSE fb_cursor;
DEALLOCATE fb_cursor;
GO