急急 练功场连不上 那位侠给寄一份access版的大富翁数据库,(100分)

  • 主题发起人 主题发起人 qwei
  • 开始时间 开始时间
Q

qwei

Unregistered / Unconfirmed
GUEST, unregistred user!
包括全部大富翁论坛的表,每个表没有记录最好。
northwater@sina.com
 
cakk.126.com有
 
诸位没理解我的意思,请看下边sql语句,是在sql7。0中创建表用的!我想在access中也用到这些表和视图,也就是在win98+access中构建大富翁。。。。。。
if exists (select * from sysobjects where id = object_id(N'[dbo].[bigriches_all]') and OBJECTPROPERTY(id, N'IsView') = 1)
drop view [dbo].[bigriches_all]
GO
if exists (select * from sysobjects where id = object_id(N'[dbo].[bigriches_thismonth]') and OBJECTPROPERTY(id, N'IsView') = 1)
drop view [dbo].[bigriches_thismonth]
GO
if exists (select * from sysobjects where id = object_id(N'[dbo].[RoomList]') and OBJECTPROPERTY(id, N'IsView') = 1)
drop view [dbo].[RoomList]
GO
if exists (select * from sysobjects where id = object_id(N'[dbo].[RoomList_a]') and OBJECTPROPERTY(id, N'IsView') = 1)
drop view [dbo].[RoomList_a]
GO
if exists (select * from sysobjects where id = object_id(N'[dbo].[RoomList_q]') and OBJECTPROPERTY(id, N'IsView') = 1)
drop view [dbo].[RoomList_q]
GO
if exists (select * from sysobjects where id = object_id(N'[dbo].[survey_all]') and OBJECTPROPERTY(id, N'IsView') = 1)
drop view [dbo].[survey_all]
GO
if exists (select * from sysobjects where id = object_id(N'[dbo].[survey_ch1]') and OBJECTPROPERTY(id, N'IsView') = 1)
drop view [dbo].[survey_ch1]
GO
if exists (select * from sysobjects where id = object_id(N'[dbo].[survey_ch2]') and OBJECTPROPERTY(id, N'IsView') = 1)
drop view [dbo].[survey_ch2]
GO
if exists (select * from sysobjects where id = object_id(N'[dbo].[survey_ch3]') and OBJECTPROPERTY(id, N'IsView') = 1)
drop view [dbo].[survey_ch3]
GO
if exists (select * from sysobjects where id = object_id(N'[dbo].[survey_ch4]') and OBJECTPROPERTY(id, N'IsView') = 1)
drop view [dbo].[survey_ch4]
GO
if exists (select * from sysobjects where id = object_id(N'[dbo].[survey_users]') and OBJECTPROPERTY(id, N'IsView') = 1)
drop view [dbo].[survey_users]
GO
if exists (select * from sysobjects where id = object_id(N'[dbo].[users_today]') and OBJECTPROPERTY(id, N'IsView') = 1)
drop view [dbo].[users_today]
GO
if exists (select * from sysobjects where id = object_id(N'[dbo].[guestbook]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[guestbook]
GO
if exists (select * from sysobjects where id = object_id(N'[dbo].[letters]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[letters]
GO
if exists (select * from sysobjects where id = object_id(N'[dbo].[Log]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Log]
GO
if exists (select * from sysobjects where id = object_id(N'[dbo].[PointInfo]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PointInfo]
GO
if exists (select * from sysobjects where id = object_id(N'[dbo].[Rooms]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Rooms]
GO
if exists (select * from sysobjects where id = object_id(N'[dbo].[survey_a]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[survey_a]
GO
if exists (select * from sysobjects where id = object_id(N'[dbo].[survey_q]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[survey_q]
GO
if exists (select * from sysobjects where id = object_id(N'[dbo].[Sys_OP_SQL]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Sys_OP_SQL]
GO
if exists (select * from sysobjects where id = object_id(N'[dbo].[Users]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Users]
GO
CREATE TABLE [dbo].[guestbook] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[UserFrom] [varchar] (50) NULL ,
[Msg] [text] NULL ,
[Datetime] [datetime] NULL ,
[msrepl_synctran_ts] [timestamp] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [dbo].[letters] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[RegDateTime] [datetime] NULL ,
[DateTime] [datetime] NULL ,
[UserFrom] [varchar] (20) NOT NULL ,
[Subject] [varchar] (200) NULL ,
[RoomID] [int] NULL ,
[Content] [text] NULL ,
[Expert] [varchar] (200) NULL ,
[Points] [int] NULL ,
[Parent] [int] NULL ,
[Status] [tinyint] NULL ,
[NeedEMail] [int] NULL ,
[IPAddr] [varchar] (15) NOT NULL ,
[GetTimes] [int] NOT NULL ,
[ReplyTimes] [int] NULL ,
[HTML_DateTime] [datetime] NULL ,
[msrepl_synctran_ts] [timestamp] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [dbo].[Log] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[DateTime] [datetime] NOT NULL ,
[UserName] [varchar] (20) NOT NULL ,
[Visited] [varchar] (50) NOT NULL ,
[Action] [tinyint] NOT NULL ,
[msrepl_synctran_ts] [timestamp] NOT NULL
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[PointInfo] (
[ID] [int] NOT NULL ,
[Note] [varchar] (50) NULL ,
[Points] [int] NULL ,
[DateTime] [datetime] NULL
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[Rooms] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[ROOM] [varchar] (50) NOT NULL ,
[LetterNum] [int] NULL ,
[NewLetter] [int] NULL ,
[Master] [varchar] (20) NULL ,
[Master2] [char] (20) NULL ,
[msrepl_synctran_ts] [timestamp] NOT NULL
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[survey_a] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[RegDateTime] [smalldatetime] NOT NULL ,
[UserFrom] [nvarchar] (20) NOT NULL ,
[QuestionID] [int] NOT NULL ,
[Content] [nvarchar] (20) NOT NULL
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[survey_q] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[Question] [nvarchar] (200) NULL ,
[ch1] [nvarchar] (50) NULL ,
[ch2] [nvarchar] (50) NULL ,
[ch3] [nvarchar] (50) NULL ,
[ch4] [nvarchar] (50) NULL
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[Sys_OP_SQL] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[OP_NAME] [char] (10) NULL ,
[OP_SQL] [text] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [dbo].[Users] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[UserName] [varchar] (20) NOT NULL ,
[Passwd] [varchar] (10) NOT NULL ,
[varchar] (100) NULL ,
[Profile] [text] NULL ,
[Points] [int] NULL ,
[RegDate] [datetime] NULL ,
[State] [int] NULL ,
[IPAddr] [varchar] (15) NULL ,
[DateTime] [datetime] NULL ,
[GetTimes] [int] NULL ,
[locked] [bit] NOT NULL ,
[Expoints] [int] NULL ,
[Earnings] [int] NULL ,
[msrepl_synctran_ts] [timestamp] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON
GO
CREATE VIEW dbo.bigriches_all
AS
SELECT TOP 20 *
FROM Users
ORDER BY Earnings DESC, ExPoints DESC
GO
SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON
GO
CREATE VIEW dbo.bigriches_thismonth
AS
SELECT TOP 20 *
FROM Users
ORDER BY ExPoints DESC, Earnings DESC
GO
SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON SET ANSI_NULLS ON
GO
CREATE VIEW dbo.RoomList
AS
SELECT Rooms.ID, Rooms.ROOM, Rooms.Master, Rooms.Master2, RoomList_q.Expr1,
RoomList_a.Expr1 AS Expr2
FROM Rooms LEFT OUTER JOIN
RoomList_q ON Rooms.ID = RoomList_q.ID LEFT OUTER JOIN
RoomList_a ON Rooms.ID = RoomList_a.ID
GO
SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON SET ANSI_NULLS ON
GO
CREATE VIEW dbo.RoomList_a
AS
SELECT Rooms.ID, COUNT(*) AS Expr1
FROM letters LEFT OUTER JOIN
Rooms ON Rooms.ID = letters.RoomID
WHERE (letters.Status = 2) AND (letters.Parent = 0) AND (NOT (Rooms.ID IS NULL))
GROUP BY Rooms.ID
GO
SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON SET ANSI_NULLS ON
GO
CREATE VIEW dbo.RoomList_q
AS
SELECT Rooms.ID, COUNT(*) AS Expr1
FROM letters LEFT OUTER JOIN
Rooms ON Rooms.ID = letters.RoomID
WHERE (letters.Status < 2) AND (letters.Parent = 0) AND (NOT (Rooms.ID IS NULL))
GROUP BY Rooms.ID
GO
SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON SET ANSI_NULLS ON
GO
CREATE VIEW dbo.survey_all
AS
SELECT survey_q.ID, survey_q.Question, survey_q.ch1, survey_ch1.num AS Expr1,
survey_q.ch2, survey_ch2.num AS Expr2, survey_q.ch3, survey_ch3.num AS Expr3,
survey_q.ch4, survey_ch4.num AS Expr4
FROM survey_q LEFT OUTER JOIN
survey_ch1 ON survey_q.ID = survey_ch1.ID LEFT OUTER JOIN
survey_ch2 ON survey_q.ID = survey_ch2.ID LEFT OUTER JOIN
survey_ch3 ON survey_q.ID = survey_ch3.ID LEFT OUTER JOIN
survey_ch4 ON survey_q.ID = survey_ch4.ID
GO
SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON SET ANSI_NULLS ON
GO
CREATE VIEW dbo.survey_ch1
AS
SELECT survey_q.ID, survey_q.ch1, COUNT(*) AS num
FROM survey_q INNER JOIN
survey_a ON survey_q.ID = survey_a.QuestionID AND
survey_q.ch1 = survey_a.Content
GROUP BY survey_q.ID, survey_q.ch1
GO
SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON SET ANSI_NULLS ON
GO
CREATE VIEW dbo.survey_ch2
AS
SELECT survey_q.ID, survey_q.ch2, COUNT(*) AS num
FROM survey_q INNER JOIN
survey_a ON survey_q.ID = survey_a.QuestionID AND
survey_q.ch2 = survey_a.Content
GROUP BY survey_q.ID, survey_q.ch2
GO
SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON SET ANSI_NULLS ON
GO
CREATE VIEW dbo.survey_ch3
AS
SELECT survey_q.ID, survey_q.ch3, COUNT(*) AS num
FROM survey_q INNER JOIN
survey_a ON survey_q.ID = survey_a.QuestionID AND
survey_q.ch3 = survey_a.Content
GROUP BY survey_q.ID, survey_q.ch3
GO
SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON SET ANSI_NULLS ON
GO
CREATE VIEW dbo.survey_ch4
AS
SELECT survey_q.ID, survey_q.ch4, COUNT(*) AS num
FROM survey_q INNER JOIN
survey_a ON survey_q.ID = survey_a.QuestionID AND
survey_q.ch4 = survey_a.Content
GROUP BY survey_q.ID, survey_q.ch4
GO
SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON
GO
CREATE VIEW dbo.survey_users
AS
SELECT DISTINCT userfrom
FROM survey_a
GO
SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON
GO
CREATE VIEW dbo.users_today
AS
SELECT *
FROM Users
WHERE DATEDIFF(dd, GETDATE(), DateTime) >= 0
GO
SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON
GO


 
倒!
有必要这么复杂吗?
你到底要干什么用?
手动创建不就完了吗?
 
本人才疏学浅,不会用access,
想在本机环境下,学习大富翁的编程方法
罢了,我自己买两张d版的sql7,自己到数据把
 
…………
会用sql server不会用access???
………………………………………………………………
 
我只是想在单位的单机上模拟大富翁,孙博士的下载点上也有源程序和数据结构

小左,不是当哥哥的说你,从你的几句话里,看出你不太厚道,还有点多疑
这样下去,以后要吃亏的.
 
多人接受答案了。
 
后退
顶部