if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_bdabc]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_bdabc]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_bddevicetype]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_bddevicetype]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_bddjfl]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_bddjfl]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_bdfiletype]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_bdfiletype]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_bdgztype]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_bdgztype]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_bdgzyytype]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_bdgzyytype]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_bdjytype]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_bdjytype]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_bdsettype]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_bdsettype]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_bdsghgtype]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_bdsghgtype]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_bdsgtype]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_bdsgtype]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_bdsgyytype]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_bdsgyytype]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_bdshcdtype]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_bdshcdtype]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_bdstructype]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_bdstructype]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_bdtzlx]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_bdtzlx]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_bdtzsbtype]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_bdtzsbtype]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_bdxjtype]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_bdxjtype]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_bdzcfl]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_bdzcfl]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_bdzn]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_bdzn]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_bdzttype]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_bdzttype]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_bjclass]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_bjclass]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_bjcrk_b]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_bjcrk_b]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_bjcrk_h]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_bjcrk_h]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_bjdoc]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_bjdoc]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_bjplancj]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_bjplancj]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_bjplandw]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_bjplandw]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_fzsbtz]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_fzsbtz]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_gzjl]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_gzjl]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_jcdb_b]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_jcdb_b]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_jcdb_h]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_jcdb_h]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_jcrs_b]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_jcrs_b]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_jcrs_h]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_jcrs_h]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_jydb_b]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_jydb_b]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_jydb_h]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_jydb_h]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_jyrs_b]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_jyrs_b]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_jyrs_h]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_jyrs_h]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_manufacture]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_manufacture]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_rhdb_b]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_rhdb_b]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_rhdb_h]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_rhdb_h]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_rhrs_b]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_rhrs_b]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_rhrs_h]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_rhrs_h]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_sbbgnote]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_sbbgnote]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_sbbjmx]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_sbbjmx]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_sbmove_b]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_sbmove_b]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_sbmove_fj]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_sbmove_fj]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_sbmove_h]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_sbmove_h]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_sbtz]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_sbtz]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_sgjl_b]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_sgjl_b]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_sgjl_h]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_sgjl_h]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_supplier]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_supplier]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_tzjh_h]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_tzjh_h]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_tzjh_zx]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_tzjh_zx]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_tzxm_cyqk]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_tzxm_cyqk]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_tzxm_fj]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_tzxm_fj]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_tzxm_h]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_tzxm_h]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_tzxm_htgl]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_tzxm_htgl]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_tzxm_jdgl]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_tzxm_jdgl]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_tzxm_sgdw]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_tzxm_sgdw]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_tzxm_tzqk]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_tzxm_tzqk]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_wdfj]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_wdfj]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_whdb_b]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_whdb_b]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_whdb_h]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_whdb_h]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_whrs_b]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_whrs_b]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_whrs_h]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_whrs_h]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_wxdb_b]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_wxdb_b]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_wxdb_cl]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_wxdb_cl]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_wxdb_h]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_wxdb_h]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_wxjh_b]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_wxjh_b]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_wxjh_bj]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_wxjh_bj]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_wxjh_cl]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_wxjh_cl]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_wxjh_h]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_wxjh_h]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_wxrs_b]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_wxrs_b]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_wxrs_bj]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_wxrs_bj]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_wxrs_cl]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_wxrs_cl]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sb_wxrs_h]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sb_wxrs_h]

CREATE TABLE [sb_bdabc] (
	[abcid] [int] IDENTITY (1, 1) NOT NULL ,
	[abccode] [nvarchar] (12) COLLATE Chinese_PRC_CI_AS NULL ,
	[abcname] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[abcend] [int] NOT NULL ,
	[abclevel] [int] NULL ,
	[dr] [smallint] NULL ,
	[fc] [smallint] NULL ,
	[ts] [datetime] NULL ,
	CONSTRAINT [PK_sb_bdabc] PRIMARY KEY  CLUSTERED 
	(
		[abcid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_bddevicetype] (
	[devicetypeid] [int] IDENTITY (1, 1) NOT NULL ,
	[devicecode] [nvarchar] (12) COLLATE Chinese_PRC_CI_AS NULL ,
	[devicename] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[deviceend] [int] NOT NULL ,
	[devicelevel] [int] NULL ,
	[dr] [smallint] NULL ,
	[fc] [smallint] NULL ,
	[ts] [datetime] NULL ,
	CONSTRAINT [PK_bddevicetype] PRIMARY KEY  CLUSTERED 
	(
		[devicetypeid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_bddjfl] (
	[djflid] [int] IDENTITY (1, 1) NOT NULL ,
	[djflcode] [nvarchar] (12) COLLATE Chinese_PRC_CI_AS NULL ,
	[djflname] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[djflend] [int] NOT NULL ,
	[djfllevel] [int] NULL ,
	[dr] [smallint] NULL ,
	[fc] [smallint] NULL ,
	[ts] [datetime] NULL ,
	CONSTRAINT [PK_sb_bddjfl] PRIMARY KEY  CLUSTERED 
	(
		[djflid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_bdfiletype] (
	[filetypeid] [int] IDENTITY (1, 1) NOT NULL ,
	[filetypecode] [char] (4) COLLATE Chinese_PRC_CI_AS NULL ,
	[filetypename] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[dr] [smallint] NULL ,
	[fc] [smallint] NULL ,
	[ts] [datetime] NULL ,
	CONSTRAINT [PK_bdfiletype] PRIMARY KEY  CLUSTERED 
	(
		[filetypeid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_bdgztype] (
	[gztypeid] [int] IDENTITY (1, 1) NOT NULL ,
	[gztypecode] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[gztypename] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[gztypeend] [int] NULL ,
	[gztypelevel] [int] NULL ,
	[dr] [smallint] NULL ,
	[fc] [smallint] NULL ,
	[ts] [datetime] NULL ,
	CONSTRAINT [PK_sb_bdgztype] PRIMARY KEY  CLUSTERED 
	(
		[gztypeid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_bdgzyytype] (
	[gzyytypeid] [int] IDENTITY (1, 1) NOT NULL ,
	[gzyytypecode] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[gzyytypename] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[gzyytypeend] [int] NULL ,
	[gzyytypelevel] [int] NULL ,
	[dr] [smallint] NULL ,
	[fc] [smallint] NULL ,
	[ts] [datetime] NULL ,
	CONSTRAINT [PK_sb_bdgzyytype] PRIMARY KEY  CLUSTERED 
	(
		[gzyytypeid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_bdjytype] (
	[jytypeid] [int] IDENTITY (1, 1) NOT NULL ,
	[jytypecode] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[jytypename] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[jytypeend] [int] NULL ,
	[jytypelevel] [int] NULL ,
	[dr] [smallint] NULL ,
	[fc] [smallint] NULL ,
	[ts] [datetime] NULL ,
	CONSTRAINT [PK_sb_bdjytype] PRIMARY KEY  CLUSTERED 
	(
		[jytypeid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_bdsettype] (
	[settypeid] [int] IDENTITY (1, 1) NOT NULL ,
	[pksettype] [char] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[settypename] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[ncorpid] [int] NULL ,
	[setend] [int] NULL ,
	[setlevel] [int] NULL ,
	[corpid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[dr] [smallint] NULL ,
	[fc] [smallint] NULL ,
	[ts] [datetime] NULL ,
	CONSTRAINT [PK_bdsettype] PRIMARY KEY  CLUSTERED 
	(
		[settypeid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_bdsghgtype] (
	[sghgtypeid] [int] IDENTITY (1, 1) NOT NULL ,
	[sghgtypecode] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[sghgtypename] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[sghgtypeend] [int] NULL ,
	[sghgtypelevel] [int] NULL ,
	[dr] [smallint] NULL ,
	[fc] [smallint] NULL ,
	[ts] [datetime] NULL ,
	CONSTRAINT [PK_sb_bdsghgtype] PRIMARY KEY  CLUSTERED 
	(
		[sghgtypeid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_bdsgtype] (
	[sgtypeid] [int] IDENTITY (1, 1) NOT NULL ,
	[sgtypecode] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[sgtypename] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[sgtypeend] [int] NULL ,
	[sgtypelevel] [int] NULL ,
	[dr] [smallint] NULL ,
	[fc] [smallint] NULL ,
	[ts] [datetime] NULL ,
	CONSTRAINT [PK_sb_bdsgtype] PRIMARY KEY  CLUSTERED 
	(
		[sgtypeid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_bdsgyytype] (
	[sgyytypeid] [int] IDENTITY (1, 1) NOT NULL ,
	[sgyytypecode] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[sgyytypename] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[sgyytypeend] [int] NULL ,
	[sgyytypelevel] [int] NULL ,
	[fc] [smallint] NULL ,
	[dr] [smallint] NULL ,
	[ts] [datetime] NULL ,
	CONSTRAINT [PK_sb_bdsgyytype] PRIMARY KEY  CLUSTERED 
	(
		[sgyytypeid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_bdshcdtype] (
	[shcdtypeid] [int] IDENTITY (1, 1) NOT NULL ,
	[shcdtypecode] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[shcdtypename] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[shcdtypeend] [int] NULL ,
	[shcdtypelevel] [int] NULL ,
	[dr] [smallint] NULL ,
	[fc] [smallint] NULL ,
	[ts] [datetime] NULL ,
	CONSTRAINT [PK_sb_bdshcdtype] PRIMARY KEY  CLUSTERED 
	(
		[shcdtypeid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_bdstructype] (
	[structypeid] [int] IDENTITY (1, 1) NOT NULL ,
	[structypecode] [char] (4) COLLATE Chinese_PRC_CI_AS NULL ,
	[structypename] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_bdstructype] PRIMARY KEY  CLUSTERED 
	(
		[structypeid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_bdtzlx] (
	[tzlxid] [int] IDENTITY (1, 1) NOT NULL ,
	[tzlx_code] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzlx_name] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[dr] [smallint] NULL ,
	[fc] [smallint] NULL ,
	[ts] [datetime] NULL ,
	CONSTRAINT [PK_sb_bdtzlx] PRIMARY KEY  CLUSTERED 
	(
		[tzlxid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_bdtzsbtype] (
	[tzsbtypeid] [int] IDENTITY (1, 1) NOT NULL ,
	[tzsbtypecode] [char] (4) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[tzsbtypename] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzsbtypelevel] [int] NULL ,
	[tzsbtypeend] [int] NULL ,
	[dr] [smallint] NULL ,
	[fc] [smallint] NULL ,
	[ts] [datetime] NULL ,
	CONSTRAINT [PK_bdtzsbtype] PRIMARY KEY  CLUSTERED 
	(
		[tzsbtypeid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_bdxjtype] (
	[xjtypeid] [int] IDENTITY (1, 1) NOT NULL ,
	[xjtypecode] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[xjtypename] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[xjtypeend] [int] NULL ,
	[xjtypelevel] [int] NULL ,
	[dr] [smallint] NULL ,
	[fc] [smallint] NULL ,
	[ts] [datetime] NULL ,
	CONSTRAINT [PK_sb_bdxjtype] PRIMARY KEY  CLUSTERED 
	(
		[xjtypeid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_bdzcfl] (
	[zcflid] [int] IDENTITY (1, 1) NOT NULL ,
	[zcflcode] [nvarchar] (12) COLLATE Chinese_PRC_CI_AS NULL ,
	[zcflname] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[zcflend] [int] NOT NULL ,
	[zcfllevel] [int] NULL ,
	[dr] [smallint] NULL ,
	[fc] [smallint] NULL ,
	[ts] [datetime] NULL ,
	CONSTRAINT [PK_sb_bdzcfl] PRIMARY KEY  CLUSTERED 
	(
		[zcflid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_bdzn] (
	[znid] [int] IDENTITY (1, 1) NOT NULL ,
	[zncode] [nvarchar] (12) COLLATE Chinese_PRC_CI_AS NULL ,
	[znname] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[znend] [int] NOT NULL ,
	[znlevel] [int] NULL ,
	[dr] [smallint] NULL ,
	[fc] [smallint] NULL ,
	[ts] [datetime] NULL ,
	CONSTRAINT [PK_sb_bdzn] PRIMARY KEY  CLUSTERED 
	(
		[znid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_bdzttype] (
	[zttypeid] [int] ,
	[zttypecode] [char] (4) COLLATE Chinese_PRC_CI_AS NULL ,
	[zttypename] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_bdzttype] PRIMARY KEY  CLUSTERED 
	(
		[zttypeid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_bjclass] (
	[bjclassid] [int] IDENTITY (1, 1) NOT NULL ,
	[classcode] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[classname] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[classend] [int] NULL ,
	[classlevel] [int] NULL ,
	[dr] [smallint] NULL ,
	[fc] [smallint] NULL ,
	[ts] [datetime] NULL ,
	CONSTRAINT [PK_sb_bjclass] PRIMARY KEY  CLUSTERED 
	(
		[bjclassid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_bjcrk_b] (
	[bjcrkbid] [int] IDENTITY (1, 1) NOT NULL ,
	[bjcrkhid] [int] NULL ,
	[bjdocid] [int] NULL ,
	[bjqcsl] [money] NULL ,
	[bjrksl] [money] NULL ,
	[bjcksl] [money] NULL ,
	[bjnote] [char] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[nrow] [int] NULL ,
	[ts] [datetime] NULL ,
	CONSTRAINT [PK_sb_bjcrk_b] PRIMARY KEY  CLUSTERED 
	(
		[bjcrkbid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_bjcrk_h] (
	[bjcrkhid] [int] IDENTITY (1, 1) NOT NULL ,
	[ndeptid] [int] NULL ,
	[crknum] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[crkdate] [datetime] NULL ,
	[crknote] [char] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[crktype] [int] NULL ,
	[n_crkzd] [int] NULL ,
	[crkshflag] [int] NULL ,
	[crkshdate] [datetime] NULL ,
	[n_crkshr] [int] NULL ,
	[ts] [datetime] NULL ,
	[deptid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[crkshr] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[crkzd] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sb_bjcrk_h] PRIMARY KEY  CLUSTERED 
	(
		[bjcrkhid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_bjdoc] (
	[bjdocid] [int] IDENTITY (1, 1) NOT NULL ,
	[bjclassid] [int] NULL ,
	[bjcode] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[bjname] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[bjgg] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[bjxh] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[bjth] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[bjjldw] [char] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[ncid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[nccode] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ncname] [char] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[ncggxh] [char] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[bjcz] [char] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[ncorpid] [int] NULL ,
	[supplierid] [int] NULL ,
	[bjzq] [int] NULL ,
	[bjdj] [money] NULL ,
	[corpid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sb_bjdoc] PRIMARY KEY  CLUSTERED 
	(
		[bjdocid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_bjplancj] (
	[bjplancjid] [int] IDENTITY (1, 1) NOT NULL ,
	[ndeptid] [int] NULL ,
	[bjdocid] [int] NULL ,
	[maxsl] [money] NULL ,
	[minsl] [money] NULL ,
	[plandj] [money] NULL ,
	[maxje] [money] NULL ,
	[minje] [money] NULL ,
	[deptid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sb_bjplancj] PRIMARY KEY  CLUSTERED 
	(
		[bjplancjid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_bjplandw] (
	[bjplandwid] [int] IDENTITY (1, 1) NOT NULL ,
	[ncorpid] [int] NULL ,
	[bjdocid] [int] NULL ,
	[maxsl] [money] NULL ,
	[minsl] [money] NULL ,
	[plandj] [money] NULL ,
	[maxje] [money] NULL ,
	[minje] [money] NULL ,
	[corpid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sb_bjplan] PRIMARY KEY  CLUSTERED 
	(
		[bjplandwid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_fzsbtz] (
	[fzsbtzid] [int] IDENTITY (1, 1) NOT NULL ,
	[sbtzid] [int] NULL ,
	[tzcode] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzzckh] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzname] [char] (40) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzggxh] [char] (40) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzsl] [int] NULL ,
	[tzdw] [char] (4) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzzccj] [char] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzyz] [money] NULL ,
	[tzccrq] [datetime] NULL ,
	[tzccbh] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzgzrq] [datetime] NULL ,
	[tzazrq] [datetime] NULL ,
	[tzqyrq] [datetime] NULL ,
	[tzazdd] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzsbwh] [char] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzsbyt] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzzscs] [nvarchar] (400) COLLATE Chinese_PRC_CI_AS NULL ,
	[tznc] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzcz] [char] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzdz] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzbz] [nvarchar] (400) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzghdw] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzsbth] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sb_fzsbtz] PRIMARY KEY  CLUSTERED 
	(
		[fzsbtzid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_gzjl] (
	[gzjlid] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[gzjlnum] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[gzjlfsrq] [datetime] NULL ,
	[gzjlpcrq] [datetime] NULL ,
	[sbtzid] [int] NULL ,
	[gzjlgzbw] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[gztypeid] [int] NULL ,
	[gzyytypeid] [int] NULL ,
	[shcdtypeid] [int] NULL ,
	[sghgtypeid] [int] NULL ,
	[gzjltjts] [money] NULL ,
	[gzjltjss] [money] NULL ,
	[gzjlwxgs] [money] NULL ,
	[gzjlwxfy] [money] NULL ,
	[gzjlgzss] [money] NULL ,
	[gzjlgzzr] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[gzjljg] [nvarchar] (1000) COLLATE Chinese_PRC_CI_AS NULL ,
	[gzjlyyfx] [nvarchar] (1000) COLLATE Chinese_PRC_CI_AS NULL ,
	[gzjlyfcs] [nvarchar] (1000) COLLATE Chinese_PRC_CI_AS NULL ,
	[n_gzjltbr] [int] NULL ,
	[flag] [int] NULL ,
	[ts] [datetime] NULL ,
	[gzjltbr] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sb_gzjl] PRIMARY KEY  CLUSTERED 
	(
		[gzjlid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_jcdb_b] (
	[pk_jcdb_b] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[pk_jcdb_h] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmname] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmvalue] [money] NULL ,
	[xmvalmin] [money] NULL ,
	[xmvalmax] [money] NULL ,
	[xmwc] [money] NULL ,
	[xmdw] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmbz] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmprvdate] [datetime] NULL ,
	[xmnextdate] [datetime] NULL ,
	[xmstartdate] [datetime] NULL ,
	[ts] [datetime] NULL ,
	[xmzq] [int] NULL ,
	[xmjyff] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmjyfs] [int] NULL ,
	CONSTRAINT [PK_sb_jcdb_b] PRIMARY KEY  CLUSTERED 
	(
		[pk_jcdb_b]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_jcdb_h] (
	[pk_jcdb_h] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[n_dbr] [int] NULL ,
	[dbdate] [datetime] NULL ,
	[sbtzid] [int] NULL ,
	[bz] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[flag] [int] NULL ,
	[ts] [datetime] NULL ,
	[dbr] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sb_jcdb_h] PRIMARY KEY  CLUSTERED 
	(
		[pk_jcdb_h]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_jcrs_b] (
	[pk_jcrs_b] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[pk_jcrs_h] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[pk_jcdb_b] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmname] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmvalue] [money] NULL ,
	[xmvalmin] [money] NULL ,
	[xmvalmax] [money] NULL ,
	[xmwc] [money] NULL ,
	[xmdw] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmbz] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[ts] [datetime] NULL ,
	[xmjyff] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmjyfs] [int] NULL ,
	[xmclvalue] [money] NULL ,
	[xmclvalmin] [money] NULL ,
	[xmclvalmax] [money] NULL ,
	[xmprvdate] [datetime] NULL ,
	CONSTRAINT [PK_sb_jcrs_b] PRIMARY KEY  CLUSTERED 
	(
		[pk_jcrs_b]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_jcrs_h] (
	[pk_jcrs_h] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[sbtzid] [int] NULL ,
	[rsdate] [datetime] NULL ,
	[rsnum] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[tvalue] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ctvalue] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[jddj] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[jcfy] [money] NULL ,
	[jcjlflag] [int] NULL ,
	[jcjlnote] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[jcdw] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[jcry] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[bz] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ts] [datetime] NULL ,
	[flag] [int] NULL ,
	[n_lropr] [int] NULL ,
	[n_shopr] [int] NULL ,
	[lropr] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[shopr] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sb_jcrs_h] PRIMARY KEY  CLUSTERED 
	(
		[pk_jcrs_h]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_jydb_b] (
	[pk_jydb_b] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[pk_jydb_h] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmname] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmvalue] [money] NULL ,
	[xmwc] [money] NULL ,
	[xmdw] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmbz] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmprvdate] [datetime] NULL ,
	[xmnextdate] [datetime] NULL ,
	[xmstartdate] [datetime] NULL ,
	[ts] [datetime] NULL ,
	[xmzq] [int] NULL ,
	[xmjyff] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmjyfs] [int] NULL ,
	CONSTRAINT [PK_sb_jydb_b] PRIMARY KEY  CLUSTERED 
	(
		[pk_jydb_b]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_jydb_h] (
	[pk_jydb_h] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[n_dbr] [int] NULL ,
	[dbdate] [datetime] NULL ,
	[sbtzid] [int] NULL ,
	[bz] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[flag] [int] NULL ,
	[ts] [datetime] NULL ,
	[dbr] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sb_jydb_h] PRIMARY KEY  CLUSTERED 
	(
		[pk_jydb_h]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_jyrs_b] (
	[pk_jyrs_b] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[pk_jyrs_h] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[pk_jydb_b] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmname] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmvalue] [money] NULL ,
	[xmwc] [money] NULL ,
	[xmdw] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmbz] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[ts] [datetime] NULL ,
	[xmjyff] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmjyfs] [int] NULL ,
	[xmclvalue] [money] NULL ,
	[xmprvdate] [datetime] NULL ,
	CONSTRAINT [PK_sb_jyrs_b] PRIMARY KEY  CLUSTERED 
	(
		[pk_jyrs_b]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_jyrs_h] (
	[pk_jyrs_h] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[sbtzid] [int] NULL ,
	[rsdate] [datetime] NULL ,
	[rsnum] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[tvalue] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ctvalue] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[jddj] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[jcfy] [money] NULL ,
	[jcjlflag] [int] NULL ,
	[jcjlnote] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[jcdw] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[jcry] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[bz] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ts] [datetime] NULL ,
	[flag] [int] NULL ,
	[n_lropr] [int] NULL ,
	[n_shopr] [int] NULL ,
	[lropr] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[shopr] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sb_jyrs_h] PRIMARY KEY  CLUSTERED 
	(
		[pk_jyrs_h]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_manufacture] (
	[manufactureid] [int] IDENTITY (1, 1) NOT NULL ,
	[sucode] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[suname] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[suaddr] [char] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[sufr] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[sulxr] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[suphone] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[susms] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[supost] [char] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[sujyfw] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]



CREATE TABLE [sb_rhdb_b] (
	[pk_rhdb_b] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[pk_rhdb_h] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmname] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmvalue] [money] NULL ,
	[xmwc] [money] NULL ,
	[xmdw] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmbz] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmprvdate] [datetime] NULL ,
	[xmnextdate] [datetime] NULL ,
	[xmstartdate] [datetime] NULL ,
	[ts] [datetime] NULL ,
	[xmzq] [int] NULL ,
	[xmjyff] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmjyfs] [int] NULL ,
	CONSTRAINT [PK_sb_rhdb_b] PRIMARY KEY  CLUSTERED 
	(
		[pk_rhdb_b]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_rhdb_h] (
	[pk_rhdb_h] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[n_dbr] [int] NULL ,
	[dbdate] [datetime] NULL ,
	[sbtzid] [int] NULL ,
	[bz] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[flag] [int] NULL ,
	[ts] [datetime] NULL ,
	[dbr] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sb_rhdb_h] PRIMARY KEY  CLUSTERED 
	(
		[pk_rhdb_h]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_rhrs_b] (
	[pk_rhrs_b] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[pk_rhrs_h] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[pk_rhdb_b] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmname] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmvalue] [money] NULL ,
	[xmwc] [money] NULL ,
	[xmdw] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmbz] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[ts] [datetime] NULL ,
	[xmjyff] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmjyfs] [int] NULL ,
	[xmclvalue] [money] NULL ,
	[xmprvdate] [datetime] NULL ,
	CONSTRAINT [PK_sb_rhrs_b] PRIMARY KEY  CLUSTERED 
	(
		[pk_rhrs_b]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_rhrs_h] (
	[pk_rhrs_h] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[sbtzid] [int] NULL ,
	[rsdate] [datetime] NULL ,
	[rsnum] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[tvalue] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ctvalue] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[jddj] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[jcfy] [money] NULL ,
	[jcjlflag] [int] NULL ,
	[jcjlnote] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[jcdw] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[jcry] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[bz] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ts] [datetime] NULL ,
	[flag] [int] NULL ,
	[n_lropr] [int] NULL ,
	[n_shopr] [int] NULL ,
	[lropr] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[shopr] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sb_rhrs_h] PRIMARY KEY  CLUSTERED 
	(
		[pk_rhrs_h]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_sbbgnote] (
	[bgid] [int] IDENTITY (1, 1) NOT NULL ,
	[sbtzid] [int] NULL ,
	[bgdate] [datetime] NULL ,
	[bgold] [nvarchar] (300) COLLATE Chinese_PRC_CI_AS NULL ,
	[bgnew] [nvarchar] (300) COLLATE Chinese_PRC_CI_AS NULL ,
	[bgoper] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[bgip] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[bgtype] [smallint] NULL ,
	[ts] [datetime] NULL ,
	CONSTRAINT [PK_sb_sbbgnote] PRIMARY KEY  CLUSTERED 
	(
		[bgid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_sbbjmx] (
	[sbbjmxid] [int] IDENTITY (1, 1) NOT NULL ,
	[sbtzid] [int] NULL ,
	[bjdocid] [int] NULL ,
	[bzbjs] [int] NULL ,
	CONSTRAINT [PK_sb_sbbjmx] PRIMARY KEY  CLUSTERED 
	(
		[sbbjmxid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_sbmove_b] (
	[mbid] [int] IDENTITY (1, 1) NOT NULL ,
	[sbtzid] [int] NULL ,
	[n_mholddeptid] [int] NULL ,
	[mholdazdd] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[n_mhnewdeptid] [int] NULL ,
	[mhnewazdd] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[mhljzj] [money] NULL ,
	[mhjz] [money] NULL ,
	[mhbz] [nvarchar] (300) COLLATE Chinese_PRC_CI_AS NULL ,
	[mhnewzttypeid] [int] NULL ,
	[ts] [datetime] NULL ,
	[mhid] [int] NULL ,
	[mhnewdeptname] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[mholddeptname] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[mholdzttypeid] [int] NULL ,
	[mholddeptid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[mhnewdeptid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sb_sbmove_b] PRIMARY KEY  CLUSTERED 
	(
		[mbid]
	)  ON [PRIMARY]  
) ON [PRIMARY]



CREATE TABLE [sb_sbmove_fj] (
	[mfjid] [int] IDENTITY (1, 1) NOT NULL ,
	[mhid] [int] NULL ,
	[nrow] [smallint] NULL ,
	[fjname] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[fjpath] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[fjsize] [int] NULL ,
	[ts] [datetime] NULL ,
	CONSTRAINT [PK_sb_sbmove_fj] PRIMARY KEY  CLUSTERED 
	(
		[mfjid]
	)  ON [PRIMARY]  
) ON [PRIMARY]



CREATE TABLE [sb_sbmove_h] (
	[mhid] [int] IDENTITY (1, 1) NOT NULL ,
	[mhdate] [datetime] NULL ,
	[mhnum] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[ndeptid] [int] NULL ,
	[nuserid] [int] NULL ,
	[mhshr] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[mhshdate] [datetime] NULL ,
	[mhshflag] [smallint] NULL ,
	[mhbdyy] [nvarchar] (300) COLLATE Chinese_PRC_CI_AS NULL ,
	[mhdjlx] [smallint] NULL ,
	[ts] [datetime] NULL ,
	[n_mholdcorpid] [int] NULL ,
	[n_mhnewcorpid] [int] NULL ,
	[mholdcorpname] [char] (40) COLLATE Chinese_PRC_CI_AS NULL ,
	[mhnewcorpname] [char] (40) COLLATE Chinese_PRC_CI_AS NULL ,
	[mhqrflag] [smallint] NULL ,
	[mhqrr] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[mhqrdate] [datetime] NULL ,
	[mholdcorpid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[mhnewcorpid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[deptid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[userid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sb_sbmove_h] PRIMARY KEY  CLUSTERED 
	(
		[mhid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_sbtz] (
	[sbtzid] [int] IDENTITY (1, 1) NOT NULL ,
	[tzcode] [char] (30) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[tzzckh] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzname] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzdz] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzgzrq] [datetime] NULL ,
	[Status] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzazdd] [char] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzzccj] [char] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzggxh] [char] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzccrq] [datetime] NULL ,
	[tzccbh] [char] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzqyrq] [datetime] NULL ,
	[tzyz] [money] NULL ,
	[tzbz] [nvarchar] (400) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzlrsj] [datetime] NULL ,
	[n_tzlrr] [int] NULL ,
	[tzzjxgsj] [datetime] NULL ,
	[n_tzshr] [int] NULL ,
	[tzshsj] [datetime] NULL ,
	[tzghdw] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzsbth] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[abcid] [int] NULL ,
	[djflid] [int] NULL ,
	[zcflid] [int] NULL ,
	[znid] [int] NULL ,
	[tzsl] [int] NULL ,
	[tzdw] [char] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzazrq] [datetime] NULL ,
	[tzsbwh] [char] (40) COLLATE Chinese_PRC_CI_AS NULL ,
	[settypeid] [int] NULL ,
	[tzsbyt] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzzscs] [nvarchar] (400) COLLATE Chinese_PRC_CI_AS NULL ,
	[tznc] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzcz] [char] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[structypeid] [int] NULL ,
	[tzsbtypeid] [int] NULL ,
	[tzzsbbz] [char] (1) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzscsbbz] [char] (1) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzgjsbbz] [char] (1) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzwhsbbz] [char] (1) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzbfbz] [char] (1) COLLATE Chinese_PRC_CI_AS NULL ,
	[ndeptid] [int] NULL ,
	[tzabc] [char] (2) COLLATE Chinese_PRC_CI_AS NULL ,
	[devicetypeid] [int] NULL ,
	[zttypeid] [int] NULL ,
	[tzzjlx] [decimal](18, 0) NULL ,
	[tznylx] [decimal](18, 0) NULL ,
	[ok] [smallint] NULL ,
	[ts] [datetime] NULL ,
	[deptid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzlrr] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzshr] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sb_temp_1] PRIMARY KEY  CLUSTERED 
	(
		[sbtzid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_sgjl_b] (
	[sgjlbid] [int] IDENTITY (1, 1) NOT NULL ,
	[sgjlhid] [int] NULL ,
	[clrq] [datetime] NULL ,
	[clnote] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[clr] [int] NULL ,
	[ts] [datetime] NULL ,
	[fjpath] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[fjname] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sb_sgjl_b] PRIMARY KEY  CLUSTERED 
	(
		[sgjlbid]
	)  ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]



CREATE TABLE [sb_sgjl_h] (
	[sgjlid] [int] IDENTITY (1, 1) NOT NULL ,
	[sgjlnum] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[sgjlfsrq] [datetime] NULL ,
	[sgjlpcrq] [datetime] NULL ,
	[sbtzid] [int] NULL ,
	[sgtypeid] [int] NULL ,
	[sgyytypeid] [int] NULL ,
	[shcdtypeid] [int] NULL ,
	[sghgtypeid] [int] NULL ,
	[sgjltjts] [money] NULL ,
	[sgjltjss] [money] NULL ,
	[sgjlwxgs] [money] NULL ,
	[sgjlwxfy] [money] NULL ,
	[sgjlgzss] [money] NULL ,
	[sgjlgzzr] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[sgjljg] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[sgjlyyfx] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[sgjlyfcs] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[sgjltbr] [int] NULL ,
	[flag] [int] NULL ,
	[ts] [datetime] NULL ,
	CONSTRAINT [PK_sb_sgjl_h] PRIMARY KEY  CLUSTERED 
	(
		[sgjlid]
	)  ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]



CREATE TABLE [sb_supplier] (
	[supplierid] [int] IDENTITY (1, 1) NOT NULL ,
	[sucode] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[suname] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[suaddr] [char] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[sufr] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[sulxr] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[suphone] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[susms] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[supost] [char] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[sujyfw] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[ncorpid] [int] NULL ,
	[corpid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sb_supplier] PRIMARY KEY  CLUSTERED 
	(
		[supplierid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_tzjh_h] (
	[tzjhhid] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[ncorpid] [int] NULL ,
	[ndeptid] [int] NULL ,
	[xm_name] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzlxid] [int] NULL ,
	[xm_tzys] [money] NULL ,
	[xm_bz] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[xm_tbr] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[xm_tbsj] [datetime] NULL ,
	[xm_pzbz] [smallint] NULL ,
	[xm_pzys] [money] NULL ,
	[xm_pzsj] [datetime] NULL ,
	[ts] [datetime] NULL ,
	[tzxmid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[nyear] [smallint] NULL ,
	[xm_ljwc] [money] NULL ,
	[xm_endbz] [smallint] NULL ,
	[corpid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[deptid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sb_tzjh_h] PRIMARY KEY  CLUSTERED 
	(
		[tzjhhid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_tzjh_zx] (
	[tzjhhid] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[tzjhzxid] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[zx_date] [datetime] NULL ,
	[zx_name] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[zx_rsje] [money] NULL ,
	[zx_bz] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[ts] [datetime] NULL ,
	CONSTRAINT [PK_sb_tzjh_zx] PRIMARY KEY  CLUSTERED 
	(
		[tzjhzxid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_tzxm_cyqk] (
	[cyqkid] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[tzxmhid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[cy_rs] [datetime] NULL ,
	[cy_ry] [varchar] (400) COLLATE Chinese_PRC_CI_AS NULL ,
	[cy_jg] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[cy_ylwt] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[cy_lx] [int] NULL ,
	[cy_lr] [varchar] (1000) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sb_tzxm_cyqk] PRIMARY KEY  CLUSTERED 
	(
		[cyqkid]
	)  ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]



CREATE TABLE [sb_tzxm_fj] (
	[fjid] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[mainid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[nrow] [smallint] NULL ,
	[fjname] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[fjpath] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[fjsize] [int] NULL ,
	[ts] [datetime] NULL ,
	CONSTRAINT [PK_sb_tzxm_fj] PRIMARY KEY  CLUSTERED 
	(
		[fjid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_tzxm_h] (
	[tzxmhid] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[ndeptid] [int] NULL ,
	[xm_code] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[xm_name] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[xm_jsdw] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[xm_jsdd] [varchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[xm_zzr] [varchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[xm_nxwh] [varchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[xm_nxsj] [datetime] NULL ,
	[xm_sjdw] [varchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[xm_ztz] [money] NULL ,
	[xm_hbtz] [money] NULL ,
	[xm_aqtz] [money] NULL ,
	[xm_zyjktz] [money] NULL ,
	[xm_jszq] [smallint] NULL ,
	[xm_ksjssj] [datetime] NULL ,
	[xm_yjtcsj] [datetime] NULL ,
	[xm_jgyssj] [datetime] NULL ,
	[xm_jgysry] [varchar] (400) COLLATE Chinese_PRC_CI_AS NULL ,
	[xm_jgysyj] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[xm_jgylwt] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[xm_jgbz] [smallint] NULL ,
	[deptid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sb_tzxm_h] PRIMARY KEY  CLUSTERED 
	(
		[tzxmhid]
	)  ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]



CREATE TABLE [sb_tzxm_htgl] (
	[htglid] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[tzxmhid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[htdocidq] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sb_tzxm_htgl] PRIMARY KEY  CLUSTERED 
	(
		[htglid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_tzxm_jdgl] (
	[jdglid] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[tzxmhid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[jd_code] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[jd_name] [varchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[jd_jh_start] [datetime] NULL ,
	[jd_jh_end] [datetime] NULL ,
	[jd_sj_start] [datetime] NULL ,
	[jd_sj_end] [datetime] NULL ,
	[jd_wcqk] [varchar] (1000) COLLATE Chinese_PRC_CI_AS NULL ,
	[ts] [datetime] NULL ,
	[jdend] [int] NULL ,
	[jdlevel] [int] NULL ,
	[jd_wcbz] [int] NULL ,
	[dr] [smallint] NULL ,
	[fc] [smallint] NULL ,
	CONSTRAINT [PK_sb_tzxm_jdgl] PRIMARY KEY  CLUSTERED 
	(
		[jdglid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_tzxm_sgdw] (
	[sgdwid] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[tzxmhid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[supplierid] [int] NULL ,
	[sg_xmjl] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[sg_lxdh] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[sg_lr] [nvarchar] (1000) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sb_tzxm_sgdw] PRIMARY KEY  CLUSTERED 
	(
		[sgdwid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_tzxm_tzqk] (
	[tzqkid] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[tzxmhid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[tzjhhid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sb_tzxm_tzqk] PRIMARY KEY  CLUSTERED 
	(
		[tzqkid]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_wdfj] (
	[wdfjid] [int] IDENTITY (1, 1) NOT NULL ,
	[sbtzid] [int] NULL ,
	[filetypeid] [int] NULL ,
	[nrow] [smallint] NULL ,
	[fjname] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[fjpath] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[fjsize] [int] NULL ,
	[ts] [datetime] NULL ,
	CONSTRAINT [PK_sbwdfj] PRIMARY KEY  CLUSTERED 
	(
		[wdfjid]
	)  ON [PRIMARY]  
) ON [PRIMARY]



CREATE TABLE [sb_whdb_b] (
	[pk_whdb_b] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[pk_whdb_h] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmname] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmvalue] [money] NULL ,
	[xmwc] [money] NULL ,
	[xmdw] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmbz] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmprvdate] [datetime] NULL ,
	[xmnextdate] [datetime] NULL ,
	[xmstartdate] [datetime] NULL ,
	[ts] [datetime] NULL ,
	[xmzq] [int] NULL ,
	[xmjyff] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmjyfs] [int] NULL ,
	CONSTRAINT [PK_sb_whdb_b] PRIMARY KEY  CLUSTERED 
	(
		[pk_whdb_b]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_whdb_h] (
	[pk_whdb_h] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[n_dbr] [int] NULL ,
	[dbdate] [datetime] NULL ,
	[sbtzid] [int] NULL ,
	[bz] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[flag] [int] NULL ,
	[ts] [datetime] NULL ,
	[dbr] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sb_whdb_h] PRIMARY KEY  CLUSTERED 
	(
		[pk_whdb_h]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_whrs_b] (
	[pk_whrs_b] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[pk_whrs_h] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[pk_whdb_b] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmname] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmvalue] [money] NULL ,
	[xmwc] [money] NULL ,
	[xmdw] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmbz] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[ts] [datetime] NULL ,
	[xmjyff] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmjyfs] [int] NULL ,
	[xmclvalue] [money] NULL ,
	[xmprvdate] [datetime] NULL ,
	CONSTRAINT [PK_sb_whrs_b] PRIMARY KEY  CLUSTERED 
	(
		[pk_whrs_b]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_whrs_h] (
	[pk_whrs_h] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[sbtzid] [int] NULL ,
	[rsdate] [datetime] NULL ,
	[rsnum] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[tvalue] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ctvalue] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[jddj] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[jcfy] [money] NULL ,
	[jcjlflag] [int] NULL ,
	[jcjlnote] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[jcdw] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[jcry] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[bz] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ts] [datetime] NULL ,
	[flag] [int] NULL ,
	[n_lropr] [int] NULL ,
	[n_shopr] [int] NULL ,
	[lropr] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[shopr] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sb_whrs_h] PRIMARY KEY  CLUSTERED 
	(
		[pk_whrs_h]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_wxdb_b] (
	[pk_wxdb_b] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[pk_wxdb_h] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmname] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmvalue] [money] NULL ,
	[xmwc] [money] NULL ,
	[xmdw] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmbz] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmprvdate] [datetime] NULL ,
	[xmnextdate] [datetime] NULL ,
	[xmstartdate] [datetime] NULL ,
	[ts] [datetime] NULL ,
	[xmzq] [int] NULL ,
	[xmjyff] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmjyfs] [int] NULL ,
	CONSTRAINT [PK_sb_wxdb_b] PRIMARY KEY  CLUSTERED 
	(
		[pk_wxdb_b]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_wxdb_cl] (
	[pk_wxdb_cl] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[pk_wxdb_h] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[bjdocid] [int] NULL ,
	[cl_sl] [money] NULL ,
	[cl_dj] [money] NULL ,
	[cl_je] [money] NULL ,
	CONSTRAINT [PK_sb_wxdb_cl] PRIMARY KEY  CLUSTERED 
	(
		[pk_wxdb_cl]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_wxdb_h] (
	[pk_wxdb_h] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[n_dbr] [int] NULL ,
	[dbdate] [datetime] NULL ,
	[sbtzid] [int] NULL ,
	[bz] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[flag] [int] NULL ,
	[ts] [datetime] NULL ,
	[dbr] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sb_wxdb_h] PRIMARY KEY  CLUSTERED 
	(
		[pk_wxdb_h]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_wxjh_b] (
	[pk_wxjh_b] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[pk_wxjh_h] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[pk_wxdb_b] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmname] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmvalue] [money] NULL ,
	[xmwc] [money] NULL ,
	[xmdw] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmbz] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[ts] [datetime] NULL ,
	[xmjyff] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmjyfs] [int] NULL ,
	[xmclvalue] [money] NULL ,
	[xmprvdate] [datetime] NULL ,
	CONSTRAINT [PK_sb_wxjh_b] PRIMARY KEY  CLUSTERED 
	(
		[pk_wxjh_b]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_wxjh_bj] (
	[pk_wxjh_bj] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[pk_wxjh_h] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[bj_oldname] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[bj_oldxh] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[bj_oldcj] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[bj_newname] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[bj_newxh] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[bj_newcj] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[bj_sl] [money] NULL ,
	CONSTRAINT [PK_sb_wxjh_bj] PRIMARY KEY  CLUSTERED 
	(
		[pk_wxjh_bj]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_wxjh_cl] (
	[pk_wxjh_cl] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[pk_wxjh_h] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[bjdocid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[cl_sl] [money] NULL ,
	[cl_dj] [money] NULL ,
	[cl_je] [money] NULL ,
	CONSTRAINT [PK_sb_wxjh_cl] PRIMARY KEY  CLUSTERED 
	(
		[pk_wxjh_cl]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_wxjh_h] (
	[pk_wxjh_h] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[sbtzid] [int] NULL ,
	[rsdate] [datetime] NULL ,
	[rsnum] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[tvalue] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ctvalue] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[jddj] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[jcfy] [money] NULL ,
	[jcjlflag] [int] NULL ,
	[jcjlnote] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[jcdw] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[jcry] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[bz] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ts] [datetime] NULL ,
	[flag] [int] NULL ,
	[lropr] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[shopr] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[rs_enddate] [datetime] NULL ,
	[rs_wxlx] [int] NULL ,
	CONSTRAINT [PK_sb_wxjh_h] PRIMARY KEY  CLUSTERED 
	(
		[pk_wxjh_h]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_wxrs_b] (
	[pk_wxrs_b] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[pk_wxrs_h] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[pk_wxdb_b] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmname] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmvalue] [money] NULL ,
	[xmwc] [money] NULL ,
	[xmdw] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmbz] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[ts] [datetime] NULL ,
	[xmjyff] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[xmjyfs] [int] NULL ,
	[xmclvalue] [money] NULL ,
	[xmprvdate] [datetime] NULL ,
	CONSTRAINT [PK_sb_wxrs_b] PRIMARY KEY  CLUSTERED 
	(
		[pk_wxrs_b]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_wxrs_bj] (
	[pk_wxrs_bj] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[pk_wxrs_h] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[bj_oldname] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[bj_oldxh] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[bj_oldcj] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[bj_newname] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[bj_newxh] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[bj_newcj] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[bj_sl] [money] NULL ,
	CONSTRAINT [PK_sb_wxrs_bj] PRIMARY KEY  CLUSTERED 
	(
		[pk_wxrs_bj]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_wxrs_cl] (
	[pk_wxrs_cl] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[pk_wxrs_h] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[bjdocid] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[cl_sl] [money] NULL ,
	[cl_dj] [money] NULL ,
	[cl_je] [money] NULL ,
	CONSTRAINT [PK_sb_wxrs_cl] PRIMARY KEY  CLUSTERED 
	(
		[pk_wxrs_cl]
	)  ON [PRIMARY] 
) ON [PRIMARY]



CREATE TABLE [sb_wxrs_h] (
	[pk_wxrs_h] [char] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[sbtzid] [int] NULL ,
	[rsdate] [datetime] NULL ,
	[rsnum] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[tvalue] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ctvalue] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[jddj] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[jcfy] [money] NULL ,
	[jcjlflag] [int] NULL ,
	[jcjlnote] [nvarchar] (60) COLLATE Chinese_PRC_CI_AS NULL ,
	[jcdw] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[jcry] [char] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[bz] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ts] [datetime] NULL ,
	[flag] [int] NULL ,
	[n_lropr] [int] NULL ,
	[n_shopr] [int] NULL ,
	[rs_enddate] [datetime] NULL ,
	[rs_wxlx] [int] NULL ,
	[lropr] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[shopr] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_sb_wxrs_h] PRIMARY KEY  CLUSTERED 
	(
		[pk_wxrs_h]
	)  ON [PRIMARY] 
) ON [PRIMARY]



