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

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