• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Society creates the lv 10

Newbie Spellweaver
Joined
Jun 27, 2013
Messages
11
Reaction score
9
Hello my name is fernando stick finish to fix the mistake of society my friend create this query to society
so that the usuariosn ~ ~ precize upalas because even with ta bug




Society lv. 10
Ferrero lv: 10
Shop lv: 5
and etc. altomatico
USE [Db_Tank]

GO/****** Object: StoredProcedure [dbo].[SP_Consortia_Add] Script Date: 09/10/2013 21:51:55 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGO-- =============================================-- Author: <Eric>-- ALTER date: <2009-10-22>-- Description: <公会组织:创建一个公会>-- =============================================ALTER PROCEDURE [dbo].[SP_Consortia_Add] @ConsortiaID int output, @BuildDate DateTime, @CelebCount int, @ChairmanID int, @ChairmanName nvarchar(100), @ConsortiaName nvarchar(100), @CreatorID int, @CreatorName nvarchar(100), @Description nvarchar(1000), @Honor int, @IP nvarchar(100), @IsExist bit, @Level int, @MaxCount int, @Placard nvarchar(1000), @Port int, @Repute int, @Count int, @Riches int, @tempDutyLevel int output, @tempDutyName varchar(200) output, @tempRight int output AS--Altere esses valoresDECLARE @ForceLevel int = 10, @ForceMaxCount int = 200, @ForceStoreLevel int = 10, @ForceSmithLevel int = 10, @ForceSkillLevel int = 10, @ForceShopLevel int = 5declare @Same intselect @Same=count(*) from Consortia where ConsortiaName=@ConsortiaName and IsExist=1if @same<>0begin return 2enddeclare @ID int declare @temp bitselect @ID=[ID],@temp=IsExist from Consortia_Users where UserID=@CreatorID if @temp=1begin return 3end set @tempDutyLevel=1 set @tempDutyName = dbo.GetTranslation('SP_Consortia_Add.Duty1') set @tempRight=4095set xact_abort onbegin tran insert into Consortia( BuildDate,CelebCount,ChairmanID,ChairmanName, ConsortiaName, CreatorID, CreatorName, [Description], Honor, IP, IsExist, [Level], MaxCount, Placard,Port,Repute,[Count],Riches, StoreLevel, ShopLevel, SkillLevel, SmithLevel) values( @BuildDate,@CelebCount,@ChairmanID,@ChairmanName, @ConsortiaName, @CreatorID, @CreatorName, @Description, @Honor, @IP, @IsExist, @ForceLevel, @ForceMaxCount, @Placard,@Port,@Repute,@Count,@Riches, @ForceStoreLevel, @ForceShopLevel , @ForceSkillLevel, @ForceSmithLevel)select @@identity as 'identity'set @ConsortiaID=@@identityif @@error<>0begin rollback tran return 1enddeclare @DutyID intinsert into Consortia_Duty(ConsortiaID,[Level],DutyName,
,IsExist)values(@ConsortiaID,1,dbo.GetTranslation('SP_Consortia_Add.Duty1'),4095,1)select @@identity as 'identity'set @DutyID=@@identityif @@error<>0begin rollback tran return 1endinsert into Consortia_Duty(ConsortiaID,[Level],DutyName,
,IsExist)values(@ConsortiaID,2,dbo.GetTranslation('SP_Consortia_Add.Duty2'),6191,1)if @@error<>0begin rollback tran return 1endinsert into Consortia_Duty(ConsortiaID,[Level],DutyName,
,IsExist)values(@ConsortiaID,3,dbo.GetTranslation('SP_Consortia_Add.Duty3'),4103,1)if @@error<>0begin rollback tran return 1endinsert into Consortia_Duty(ConsortiaID,[Level],DutyName,
,IsExist)values(@ConsortiaID,4,dbo.GetTranslation('SP_Consortia_Add.Duty4'),4096,1)if @@error<>0begin rollback tran return 1endinsert into Consortia_Duty(ConsortiaID,[Level],DutyName,
,IsExist)values(@ConsortiaID,5,dbo.GetTranslation('SP_Consortia_Add.Duty5'),4096,1)if @@error<>0begin rollback tran return 1endif @ID is null or @ID=0begininsert into Consortia_Users(ConsortiaID,UserID,UserName,RatifierID,RatifierName,DutyID,Remark,IsExist,IsBanChat)values(@ConsortiaID,@CreatorID,@CreatorName,@CreatorID,@CreatorName,@DutyID,'',1,0)if @@error<>0begin rollback tran return 1endendelsebeginupdate Consortia_Users set ConsortiaID=@ConsortiaID,RatifierID=@CreatorID,RatifierName=@CreatorName,DutyID=@DutyID,Remark='',IsExist=1,IsBanChat=0where [ID]=@IDif @@error<>0begin rollback tran return 1endend--insert into Consortia_Ally( Consortia1ID,Consortia2ID,State,Date,ValidDate,IsExist) --select @ConsortiaID,ConsortiaID,0,getdate(),0,1 from Consortia where ConsortiaID<>@ConsortiaID and IsExist=1--if @@error<>0--begin-- rollback tran-- return @@error--endUpdate Sys_Users_Detail set ConsortiaID = @ConsortiaID,IsConsortia=1 where UserID=@CreatorID and IsExist=1if @@error<>0begin rollback tran return @@errorendcommit transet xact_abort off return 0








RzBr
 
Last edited by a moderator:
dat face
Loyal Member
Joined
May 25, 2012
Messages
1,738
Reaction score
621
make your query looks clean..

use
Code:
 
Back
Top