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

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

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