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,17 @@
update c
set TOROLT = 'T', MODIFIER = 0, LASTCHANGED = GETDATE(), SERIAL += 1
from T_CIM c
inner join
(
select * from
(
select
c.ID
,ROW_NUMBER() OVER(PARTITION BY c.C_CIMTIPUSA, c.C_TANEVID, c.C_FELHASZNALOID, c.C_GONDVISELOID ORDER BY c.C_ALAPERTELMEZETT desc, c.CREATED) as 'SorSzam'
from T_CIM c
inner join T_TANEV te on te.ID = c.C_TANEVID and te.TOROLT = 'F'
where c.TOROLT = 'F'
) as SorSzamozott
where SorSzamozott.SorSzam > 1
) as Torlendok
on Torlendok.ID = c.ID