有错误?CT看看!!!
服务器: 消息 137,级别 15,状态 2,行 1
必须声明变量 '@id'。
服务器: 消息 137,级别 15,状态 1,行 3
必须声明变量 '@id'。
服务器: 消息 137,级别 15,状态 1,行 5
必须声明变量 ...
maore9810 发表于 2009-11-28 18:19  - /****** Object: Stored Procedure dbo.LOAD_USER_DATA Script Date: 2009-04-10 11:09 am ******/
- CREATE PROCEDURE LOAD_USER_DATA
- @AccountID char(21),
- @id char(21),
- @nRet smallint OUTPUT
- AS
- DECLARE @charid1 char(21), @charid2 char(21), @charid3 char(21)
- DECLARE @True smallint
- SET @charid1 = null
- SET @charid2 = null
- SET @charid3 = null
- SET @True = 0
- SET @nRet = 0
- SELECT @charid1 = strCharID1, @charid2 = strCharID2, @charid3 = strCharID3 FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID
- IF @id = @charid1 or @id = @charid2 or @id = @charid3
- SET @True = 1
- IF @True = 0
- BEGIN
- SET @nRet = 0
- RETURN
- END
- --Oto Master
- UPDATE USERDATA SET Class = Class + 4 WHERE strUserId = @id AND Level > 10 AND Class IN(101, 201)
- UPDATE USERDATA SET Class = Class + 5 WHERE strUserId = @id AND Level > 10 AND Class IN(102, 202)
- UPDATE USERDATA SET Class = Class + 6 WHERE strUserId = @id AND Level > 10 AND Class IN(103, 203)
- UPDATE USERDATA SET Class = Class + 7 WHERE strUserId = @id AND Level > 10 AND Class IN(104, 204)
- UPDATE USERDATA SET Class = Class + 1 WHERE strUserId = @id AND Level > 59 AND Class IN(105, 107, 109, 111, 205, 207, 209, 211)
- SELECT Nation, Race, Class, HairColor, Rank, Title, [Level], [Exp], Loyalty, Face, City, Knights, Fame,
- Hp, Mp, Sp, Strong, Sta, Dex, Intel, Cha, Authority, Points, Gold, [Zone], Bind, PX, PZ, PY, dwTime, strSkill, strItem,strSerial, sQuestCount, strQuest, MannerPoint, LoyaltyMonthly
- FROM USERDATA WHERE strUserId = @id
- SET @nRet = @@RowCount
- RETURN
- GO
复制代码 |