﻿DISABLE TRIGGER [tr_tanitasioraLog] ON T_TANITASIORA
GO
UPDATE tno
SET tno.C_CSENGETESIRENDID = cs.ID, tno.C_CSENGETESIRENDORAID = cso.ID
FROM T_TANITASIORA tno
INNER JOIN T_CSENGETESIREND cs ON cs.C_TANEVID = tno.C_TANEVID AND cs.C_AKTIV = 'T'
INNER JOIN T_CSENGETESIRENDORA cso ON cso.C_CSENGETESIRENDID = cs.ID AND cso.C_ORASZAM = tno.C_ORASZAM
WHERE tno.C_CSENGETESIRENDID IS NULL AND tno.TOROLT = 'F'
GO
ENABLE TRIGGER [tr_tanitasioraLog] ON T_TANITASIORA
GO

DISABLE TRIGGER [tr_orarendioraLog] ON T_ORARENDIORA
GO
UPDATE oo
SET oo.C_CSENGETESIRENDID = cs.ID, oo.C_CSENGETESIRENDORAID = cso.ID
FROM T_ORARENDIORA oo
INNER JOIN T_CSENGETESIREND cs ON cs.C_TANEVID = oo.C_TANEVID AND cs.C_AKTIV = 'T'
INNER JOIN T_CSENGETESIRENDORA cso ON cso.C_CSENGETESIRENDID = cs.ID AND cso.C_ORASZAM = oo.C_ORASZAM
WHERE oo.C_CSENGETESIRENDID IS NULL AND oo.TOROLT = 'F'
GO
ENABLE TRIGGER [tr_orarendioraLog] ON T_ORARENDIORA
GO
