if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[WareGroupsDepartmentsXtab_InsTrg]') and OBJECTPROPERTY(id, N'IsTrigger') = 1)
  drop trigger [dbo].[WareGroupsDepartmentsXtab_InsTrg]
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[WareGroupsDepartmentsXtab_DelTrg]') and OBJECTPROPERTY(id, N'IsTrigger') = 1)
  drop trigger [dbo].[WareGroupsDepartmentsXtab_DelTrg]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[WareGroups_InsTrg]') and OBJECTPROPERTY(id, N'IsTrigger') = 1)
  drop trigger [dbo].[WareGroups_InsTrg]
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[WareGroups_UpdTrg]') and OBJECTPROPERTY(id, N'IsTrigger') = 1)
  drop trigger [dbo].[WareGroups_UpdTrg]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Ware_InsTrg]') and OBJECTPROPERTY(id, N'IsTrigger') = 1)
  drop trigger [dbo].[Ware_InsTrg]
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Ware_UpdTrg]') and OBJECTPROPERTY(id, N'IsTrigger') = 1)
  drop trigger [dbo].[Ware_UpdTrg]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[WareDepartmentsXtab_InsTrg]') and OBJECTPROPERTY(id, N'IsTrigger') = 1)
  drop trigger [dbo].[WareDepartmentsXtab_InsTrg]
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[WareDepartmentsXtab_DelTrg]') and OBJECTPROPERTY(id, N'IsTrigger') = 1)
  drop trigger [dbo].[WareDepartmentsXtab_DelTrg]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Personel_InsTrg]') and OBJECTPROPERTY(id, N'IsTrigger') = 1)
  drop trigger [dbo].[Personel_InsTrg]
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Personel_UpdTrg]') and OBJECTPROPERTY(id, N'IsTrigger') = 1)
  drop trigger [dbo].[Personel_UpdTrg]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PersonelDepartmentsXtab_InsTrg]') and OBJECTPROPERTY(id, N'IsTrigger') = 1)
  drop trigger [dbo].[PersonelDepartmentsXtab_InsTrg]
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PersonelDepartmentsXtab_DelTrg]') and OBJECTPROPERTY(id, N'IsTrigger') = 1)
  drop trigger [dbo].[PersonelDepartmentsXtab_DelTrg]




