if Exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Sp_SodorFactor_Retail]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
Drop Procedure [dbo].[Sp_SodorFactor_Retail]


if Exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Sodor_Factor]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
Drop Procedure [dbo].[Sodor_Factor]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[SearchKhordehForoshi]') and xtype in (N'FN', N'IF', N'TF'))
drop function [dbo].[SearchKhordehForoshi]


