[HELP]Guilds deleted after restart

09/27/2011 16:13 [Dev]Cataclysm#1
I did use the search function before posting, but what I found and used, didn't really work out too well for me. Of course In comparing the dependicies of a working Guild table, I can not seem to figure out how to transfer them or get it to work on the Guild table that is having the issue.

So is there a correct query that can be ran to fix this, or is it a modification of the table where I must change something to get it to work correctly? All help is appreciated.
09/27/2011 22:56 [Admin]Snuggle#2
I had this issue at first too.
Took me awhile to figure out exactly what the issue was even though I thought I looked though everything lol
I thought it was an SP issue so I kept looking there..
Here's what I used to fix it:
Code:
Use PS_gamedata

drop table [dbo].[Guilds]

CREATE TABLE [dbo].[Guilds] (
	[RowID] [int] IDENTITY (1, 1) NOT NULL ,
	[GuildID] [int] NOT NULL ,
	[GuildName] [varchar] (30) COLLATE Latin1_General_CI_AS NOT NULL ,
	[MasterUserID] [varchar] (18) COLLATE Latin1_General_CI_AS NOT NULL ,
	[MasterCharID] [int] NOT NULL ,
	[MasterName] [varchar] (30) COLLATE Latin1_General_CI_AS NOT NULL ,
	[Country] [tinyint] NOT NULL ,
	[TotalCount] [smallint] NOT NULL ,
	[GuildPoint] [int] NOT NULL ,
	[Del] [tinyint] DEFAULT (0) ,
	[CreateDate] [datetime] (getdate())  ,
	[DeleteDate] [datetime] (getdate()) 
) ON [PRIMARY]
Credits go to [GM]Recover for his post about it here:
[Only registered and activated users can see links. Click Here To Register...]
Not sure who originally showed how to fix it.
09/27/2011 23:02 Xx.LaMin.xX#3
originally one is Twillight from r a n g e z o n e if im not wrong.
09/29/2011 13:58 [Dev]Cataclysm#4
This is going to sound nubby but eh, I am still readin up on SQL. I have came accross a slight error when executing it. I have even tried playing around with it to see if it would work, but all it gave me was

"Msg 102, Level 15, State 1, Line 16
Incorrect syntax near '('.

So as I have been trying to read up on this through Google & staring at the query to see what to change, i have failed to fix it lol
09/29/2011 14:37 Xx.LaMin.xX#5
It isnt look like the same i have on my server.. mine is
Quote:
USE [PS_GameData]
GO
/****** Object: Table [dbo].[Guilds] Script Date: 09/29/2011 06:36:30 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Guilds](
[RowID] [int] IDENTITY(1,1) NOT NULL,
[GuildID] [int] NOT NULL,
[GuildName] [varchar](30) COLLATE Chinese_PRC_Stroke_CI_AI NOT NULL,
[MasterUserID] [varchar](12) COLLATE Chinese_PRC_Stroke_CI_AI NOT NULL,
[MasterCharID] [int] NOT NULL,
[MasterName] [varchar](30) COLLATE Chinese_PRC_Stroke_CI_AI NOT NULL,
[Country] [tinyint] NOT NULL,
[TotalCount] [smallint] NOT NULL,
[GuildPoint] [int] NOT NULL,
[Del] [tinyint] NOT NULL CONSTRAINT [DF_Guilds_Del] DEFAULT (0),
[CreateDate] [datetime] NOT NULL,
[DeleteDate] [datetime] NULL,
CONSTRAINT [PK_Guilds] PRIMARY KEY CLUSTERED
(
[GuildID] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
09/29/2011 14:53 [Dev]Cataclysm#6
Ok I dropped the table and used your query, going to test it out now :) Thanks LaMin

*Edit* Tested it and the guild is still there after restart :) Ty again
09/24/2012 15:55 [ADM]BLooM#7
Quote:
Originally Posted by Xx.LaMin.xX View Post
It isnt look like the same i have on my server.. mine is


Ok i tryed this one and i get this error on SQL


Msg 2714, Level 16, State 6, Line 1
There is already an object named 'Guilds' in the database.
09/24/2012 16:14 DarkAngel71#8
Code:
check first line :

USE [PS_GameData]

Add under :

drop table [dbo].[Guilds]
this will delete the table you've got actually, then create the new one ...

(but the first code in this thread seems to be the better one to me -_- ..)
09/24/2012 16:41 [ADM]BLooM#9
Quote:
Originally Posted by DarkAngel71 View Post
Code:
check first line :

USE [PS_GameData]

Add under :

drop table [dbo].[Guilds]
this will delete the table you've got actually, then create the new one ...

(but the first code in this thread seems to be the better one to me -_- ..)
is give me an eror this to

Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'check'.
Msg 102, Level 15, State 1, Line 5
Incorrect syntax near ':'.

Anyone know how to fix it ? Ill aprecied any good post about this !

Done. ! Fixed ... i deleted dbo.Guilds manually and i used this script :

USE [PS_GameData]
GO
/****** Object: Table [dbo].[Guilds] Script Date: 09/29/2011 06:36:30 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Guilds](
[RowID] [int] IDENTITY(1,1) NOT NULL,
[GuildID] [int] NOT NULL,
[GuildName] [varchar](30) COLLATE Chinese_PRC_Stroke_CI_AI NOT NULL,
[MasterUserID] [varchar](12) COLLATE Chinese_PRC_Stroke_CI_AI NOT NULL,
[MasterCharID] [int] NOT NULL,
[MasterName] [varchar](30) COLLATE Chinese_PRC_Stroke_CI_AI NOT NULL,
[Country] [tinyint] NOT NULL,
[TotalCount] [smallint] NOT NULL,
[GuildPoint] [int] NOT NULL,
[Del] [tinyint] NOT NULL CONSTRAINT [DF_Guilds_Del] DEFAULT (0),
[CreateDate] [datetime] NOT NULL,
[DeleteDate] [datetime] NULL,
CONSTRAINT [PK_Guilds] PRIMARY KEY CLUSTERED
(
[GuildID] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF

Thx to everyone !
09/24/2012 17:48 DarkAngel71#10
well ... seems I failed my code syntax, or you failed understanding it !!!

I meant :
after first line :
Code:
USE [PS_GameData]
add :
Code:
drop table [dbo].[Guilds]