if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[TD_HistoryDeleteSanad]') and OBJECTPROPERTY(id, N'IsTrigger') = 1)
Drop Trigger [dbo].[TD_HistoryDeleteSanad]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Sp_RepSalesStatus]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[Sp_RepSalesStatus]