if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[SF_cg2审核采购订单]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[SF_cg2审核采购订单]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[SF_cg5订货合同计划登记]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[SF_cg5订货合同计划登记]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[SYS清采购订单]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[SYS清采购订单]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[SYS清采购订单审核]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[SYS清采购订单审核]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[mrp计算old]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[mrp计算old]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sf_KF2批次调拨单]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sf_KF2批次调拨单]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sf_cg1删除全部未用项]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sf_cg1删除全部未用项]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sf_cg1取得采购项]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sf_cg1取得采购项]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sf_cg1填写采购订单]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sf_cg1填写采购订单]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sf_cg3修改采购订单]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sf_cg3修改采购订单]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sf_cj1填生产订单]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sf_cj1填生产订单]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sf_cj2审生产订单]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sf_cj2审生产订单]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sf_cj5填完工报告单]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sf_cj5填完工报告单]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sf_cj5由MRP生成生产订单]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sf_cj5由MRP生成生产订单]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sf_kf1填成品入库单]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sf_kf1填成品入库单]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sf_mps主生产计划审核]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sf_mps主生产计划审核]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sf_mps主生产计划预排]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sf_mps主生产计划预排]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sf_mps填需求计划]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sf_mps填需求计划]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sf_mrpMpsTest]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sf_mrpMpsTest]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sf_mrpTest子项毛需求]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sf_mrpTest子项毛需求]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sf_mrpTest计算]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sf_mrpTest计算]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sf_mrpmps]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sf_mrpmps]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sf_mrp子项毛需求]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sf_mrp子项毛需求]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sf_mrp生产件资源负荷]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sf_mrp生产件资源负荷]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sf_mrp计算]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sf_mrp计算]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sf_mrp试算生产件资源负荷]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sf_mrp试算生产件资源负荷]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sf_sc生成领料单]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sf_sc生成领料单]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sf_加入进销存卡片]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sf_加入进销存卡片]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sys生成资源日程表]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sys生成资源日程表]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[低层码]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[低层码]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[V物料主文件]') and OBJECTPROPERTY(id, N'IsView') = 1)
drop view [dbo].[V物料主文件]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[v商品库存明细]') and OBJECTPROPERTY(id, N'IsView') = 1)
drop view [dbo].[v商品库存明细]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[v资源清单]') and OBJECTPROPERTY(id, N'IsView') = 1)
drop view [dbo].[v资源清单]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[v资源负荷报表]') and OBJECTPROPERTY(id, N'IsView') = 1)
drop view [dbo].[v资源负荷报表]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[bom信息状态]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[bom信息状态]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[bom状态]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[bom状态]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[jzh每月结转日期表]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[jzh每月结转日期表]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[mrp0]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[mrp0]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[mrpcalcd]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[mrpcalcd]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[mrpcalcm]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[mrpcalcm]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[mrp历史]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[mrp历史]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[mrp发布时间]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[mrp发布时间]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[mrp正式]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[mrp正式]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[mrp简单计算]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[mrp简单计算]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[mrp试算]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[mrp试算]
GO
if exists (select * from dbo.sysobjects where id = obje