﻿DISABLE TRIGGER ALL ON T_DICTIONARYITEMBASE;
EXEC [dev].[uspCreateDictionaryItems] NULL, NULL;
ENABLE TRIGGER ALL ON T_DICTIONARYITEMBASE;
GO

;DISABLE TRIGGER ALL ON T_TEREM
UPDATE te
SET
	te.C_EGYEDIAZONOSITO = NEWID()
FROM T_TEREM te
JOIN T_TANEV t on t.ID = te.C_TANEVID AND t.C_AKTIV = 'T' AND t.TOROLT = 'F'
WHERE
	te.C_EGYEDIAZONOSITO IS NULL AND te.TOROLT = 'F'
;ENABLE TRIGGER ALL ON T_TEREM