【SQL开源代码栏目提醒】:网学会员SQL开源代码为您提供House_MIS.sql参考,解决您在House_MIS.sql学习中工作中的难题,参考学习。
/*==============================================================*/
/* Database name: housedb */
/* DBMS name: Microsoft SQL Server 2000 */
/* Created on: 2003-7-29 10:34:03 */
/*==============================================================*/
IF EXISTS (SELECT *
FROM sysdatabases
WHERE name = 'housedb')
DROP DATABASE housedb
GO
CREATE DATABASE housedb
GO
use housedb
go
if exists (select 1
from sysobjects
where id = object_id('qryDCFTZMJ')
and type = 'U')
drop table qryDCFTZMJ
go
if exists (select 1
from sysobjects
where id = object_id('qryFBYT')
and type = 'U')
drop table qryFBYT
go
if exists (select 1
from sysobjects
where id = object_id('qryFT')
and type = 'U')
drop table qryFT
go
if exists (select 1
from sysobjects
where id = object_id('qryGL')
and type = 'U')
drop table qryGL
go
if exists (select 1
from sysobjects
where id = object_id('qryHSDCFT')
and type = 'U')
drop table qryHSDCFT
go
if exists (select 1
from sysobjects
where id = object_id('qryHSQTFT')
and type = 'U')
drop table qryHSQTFT
go
if exists (select 1
from sysobjects
where id = object_id('qryHSYCFT')
and type = 'U')
drop table qryHSYCFT
go
if exists (select 1
from sysobjects
where id = object_id('qryYCFTZMJ')
and type = 'U')
drop table qryYCFTZMJ
go
if exists (select 1
from sysobjects
where id = object_id('qryYT')
and type = 'U')
drop table qryYT
go
if exists (select 1
from sysobjects
where id = object_id('rptFT')
and type = 'U')
drop table rptFT
go
if exists (select 1
from sysobjects
where id = object_id('rptLayer')
and type = 'U')
drop table rptLayer
go
if exists (select 1
from sysobjects
where id = object_id('rptTX')
and type = 'U')
drop table rptTX
go
if exists (select 1
from sysobjects
where id = object_id('tbArea')
and type = 'U')
drop table tbArea
go
if exists (select 1
from sysobjects
where id = object_id('tbFTarea')
and type = 'U')
drop table tbFTarea
go
if exists (select 1
from sysobjects
where id = object_id('tbFeature')
and type = 'U')
drop table tbFeature
go
if exists (select 1
from sysobjects
where id = object_id('tbFir')
and type = 'U')
drop table tbFir
go
if exists (select 1
from sysobjects
where id = object_id('tbHS')
and type = 'U')
drop table tbHS
go
if exists (select 1
from sysobjects
where id = object_id('tbTable')
and type = 'U')
drop table tbTable
go
/*==============================================================*/
/* Table : qryDCFTZMJ */
/*==============================================================*/
create table qryDCFTZMJ (
tbName nvarchar(10) null,
FtKey nvarchar(10) null,
DCZMJ float null
)
go
/*==============================================================*/
/* Table : qryFBYT */
/*==============================================================*/
create table qryFBYT (
tbName nvarchar(10) null,
FtKey nvarchar(10) null,
YTArea float null
)
go
/*==============================================================*/
/* Table : qryFT */
/*==============================================================*/
create table qryFT (
F_tbName nvarchar(10) null,
F_FtKey nvarchar(10) null,
F_Farea float null,
F_Ftype smallint null,
F_JC int null,
F_CS int null,
H_tbName nvarchar(10) null,
H_FtKey nvarchar(10) null,
H_JC int null,
H_CS int null,
H_JCHH nvarchar(8) null,
H_Farea float null,
FTTYPE smallint null
)
go
/*==============================================================*/
/* Table : qryGL */
/*==============================================================*/
create table qryGL (
tbName nvarchar(10) null,
FtKey nvarchar(10) null,
GLArea float null
)
go
/*==============================================================*/
/* Table : qryHSDCFT */
/*==============================================================*/
create table qryHSDCFT (
tbName nvarchar(10) null,
FtKey nvarchar(10) null,
DCFTXS float null,
DCFTMJ float null
)
go
/*==============================================================*/
/* Table : qryHSQTFT */
/*==============================================================*/
create table qryHSQTFT (
tbName nvarchar(10) null,
FtKey nvarchar(10) null,
QTFTXS float null,
QTFTMJ float null
)
go
/*==============================================================*/
/* Table : qryHSYCFT */
/*==============================================================*/
create table qryHSYCFT (
tbName nvarchar(10) null,
FtKey nvarchar(10) null,
YCFTXS float null,
YCFTMJ float nu