﻿-- Műszaki
DELETE FROM T_JOGOSULTSAG WHERE C_SZEREPKORTIPUS = 6503
GO

DELETE FROM T_JOGOSULTSAG_FELHASZNALO WHERE C_JOGOSULTSAGID in (SELECT ID FROM T_JOGOSULTSAG WHERE C_SZEREPKORTIPUS = 6503)
GO

DELETE FROM T_FELHASZNALO_SZEREPKOR where C_SZEREPKORID IN (SELECT ID FROM T_SZEREPKOR WHERE C_SZEREPKORTIPUS = 6503)
GO

DELETE FROM T_SZEREPKOR WHERE C_SZEREPKORTIPUS = 6503
GO

DELETE FROM T_SZEREPKORTIPUS WHERE ID = 6503
GO

DELETE FROM T_DICTIONARYITEMBASE WHERE ID = 6503 AND C_TYPE = 'SzerepkorTipus'
GO

-- Vezető
DELETE FROM T_JOGOSULTSAG WHERE C_SZEREPKORTIPUS = 6502
GO

DELETE FROM T_JOGOSULTSAG_FELHASZNALO WHERE C_JOGOSULTSAGID in (SELECT ID FROM T_JOGOSULTSAG WHERE C_SZEREPKORTIPUS = 6502)
GO

DELETE FROM T_FELHASZNALO_SZEREPKOR where C_SZEREPKORID IN (SELECT ID FROM T_SZEREPKOR WHERE C_SZEREPKORTIPUS = 6502)
GO

DELETE FROM T_SZEREPKOR WHERE C_SZEREPKORTIPUS = 6502
GO

DELETE FROM T_SZEREPKORTIPUS WHERE ID = 6502
GO

DELETE FROM T_DICTIONARYITEMBASE WHERE ID = 6502 AND C_TYPE = 'SzerepkorTipus'
GO
