How to delete Guilds at all game ?

06/22/2018 03:33 kubed#1
Hello can any one help me for delete all guilds from game !


try this code

USE SRO_VT_SHARD;
ALTER TABLE [_Guild] DROP CONSTRAINT [FK__Guild__AlliedClans];
TRUNCATE TABLE _Guild;
SET IDENTITY_INSERT _Guild ON
INSERT INTO [_Guild] ([ID],[Name],[Lvl],[GatheredSP],[FoundationDate],[Alliance],[MasterCommentTitle],[MasterComment],[Booty],[Gold],[LastCrestRev],[CurCrestRev],[MercenaryAttr]) VALUES (0, 'dummy', 1, 0, getdate(), 0, null, null, 0, 0, 0, 0, 0);
SET IDENTITY_INSERT _Guild OFF
ALTER TABLE [_Guild] ADD CONSTRAINT [FK__Guild__AlliedClans] FOREIGN KEY(Alliance)REFERENCES [_AlliedClans](ID);

give me error

Msg 4712, Level 16, State 1, Line 3
Cannot truncate table '_Guild' because it is being referenced by a FOREIGN KEY constraint.

so there any one can help please !
06/22/2018 04:11 loader8#2
just Truncate the Tables and done
06/22/2018 20:58 kubed#3
give me error it's have CONSTRAINT [FK__Guild__AlliedClans] and pk_Guild etc ...
06/26/2018 21:16 NorseGodTyr#4
Quote:
Originally Posted by kubed View Post
give me error it's have CONSTRAINT [FK__Guild__AlliedClans] and pk_Guild etc ...
USE [SRO_VT_SHARD]
GO
TRUNCATE TABLE [dbo].[_GuildWar]
TRUNCATE TABLE [dbo].[_GuildMember]
TRUNCATE TABLE [dbo].[_GuildChest]
UPDATE [dbo].[_AlliedClans] SET Ally1 = '0', Ally2 = '0', Ally3 = '0', Ally4 = '0', Ally5 = '0', Ally6 = '0', Ally7 = '0', Ally8 = '0'
DELETE FROM [dbo].[_Guild] WHERE ID > 0
DELETE FROM [dbo].[_AlliedClans] WHERE ID > 0