SHERLOCK HOLMES
|
• الانـتـسـاب » May 2010
|
• رقـم العـضـويـة » 71047
|
• المشـــاركـات » 1,744
|
• الـدولـة » المــــــــــــنصورة
|
• الـهـوايـة » 1337
|
• اسـم الـسـيـرفـر » Private Server
|
• الـجـنـس » Male
|
• نقـاط التقييم » 10
|
|
|
رد: Union fix
UnIon FiX
اقتباس:
USE [SRO_VT_SHARD]
GO
/****** Object: StoredProcedure [dbo].[_Guild_Create] Script Date: 14.06.2014 16:53:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
--
ALTER PROCEDURE [dbo].[_Guild_Create]
@guildName varchar(64),
@CreaterID int
as
if (exists (select id from _Guild where Name = @guildName))
begin
return -1000
end
if (exists (select CharID from _GuildMember where CharID = @CreaterID))
begin
return -1001
end
begin transaction
declare @guildID int
declare @FoundationDate smalldatetime
set @FoundationDate = GetDate()
insert _Guild(Name, Lvl, GatheredSP, FoundationDate,Alliance,Booty) values @guildName+'_ULimit_1', 1, 0, @FoundationDate,0,0)
insert _Guild(Name, Lvl, GatheredSP, FoundationDate,Alliance,Booty) values @guildName+'_ULimit_2', 1, 0, @FoundationDate,0,0)
insert _Guild(Name, Lvl, GatheredSP, FoundationDate,Alliance,Booty) values @guildName+'_ULimit_3', 1, 0, @FoundationDate,0,0)
insert _Guild(Name, Lvl, GatheredSP, FoundationDate,Alliance,Booty) values @guildName+'_ULimit_4', 1, 0, @FoundationDate,0,0)
insert _Guild(Name, Lvl, GatheredSP, FoundationDate,Alliance,Booty) values @guildName+'_ULimit_5', 1, 0, @FoundationDate,0,0)
insert _Guild(Name, Lvl, GatheredSP, FoundationDate,Alliance,Booty) values @guildName, 5, 0, @FoundationDate,0,0)
set @guildID = @@identity
if (@@error <> 0 or @@rowcount = 0 or @guildID = 0)
begin
rollback transaction
return -5
end
|
|