[Help] Problem with adding PK symbol's

Junior Spellweaver
Joined
Jun 7, 2006
Messages
144
Reaction score
1
Hi I got a problem when I'm trying to add code 2&3 from:

http://forum.ragezone.com/f464/help-add-pk-symbols-470402/


It look's like:

Maltuz - [Help] Problem with adding PK symbol's - RaGEZONE Forums



can someone pls tell me what's wrong?
 
Last edited by a moderator:
Re: Problem with adding PK symbol's

your procedure is wrong lol


Code:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER OFF
GO

/****** Object:  Stored Procedure dbo.UPDATE_PERSONAL_RANK    Script Date: 6/6/2006 6:03:32 PM ******/
-- SexyKO => 2008


ALTER   PROCEDURE  [dbo].[UPDATE_PERSONAL_RANK]

AS

DECLARE @tUpdateDate SMALLDATETIME

set @tupdatedate = getdate()

/* --create a karus_rank table and elmo_rank table if u dont have them yet !
create table [KARUS_RANK]
(
	[nRank] [int] IDENTITY (1, 1) NOT NULL ,
	[strUserID] char(21) NOT NULL,
	[LoyaltyMonthly] int NOT NULL,
	[Loyalty] int NOT NULL,
	[nRankUP] int NOT NULL
) ON [PRIMARY]

create table [ELMO_RANK]
(
	[nRank] [int] IDENTITY (1, 1) NOT NULL ,
	[strUserID] char(21) NOT NULL,
	[LoyaltyMonthly] int NOT NULL,
	[Loyalty] int NOT NULL,
	[nRankUP] int NOT NULL
) ON [PRIMARY]

*/
truncate table karus_rank -- 
insert  KARUS_RANK
	select top 100 strUserID, LoyaltyMonthly, Loyalty, 101
	from USERDATA
	where Nation = 1
	order by LoyaltyMonthly desc, Loyalty desc

truncate table elmo_rank -- 
insert  ELMO_RANK
	select top 100 strUserID, LoyaltyMonthly, Loyalty, 101
	from USERDATA
	where Nation = 2
	order by LoyaltyMonthly desc, Loyalty desc


UPDATE KARUS_RANK
	Set nRankUP = R.nRank - KARUS_RANK.nRank
	from USER_PERSONAL_RANK R
	where R.strKarusUserID = KARUS_RANK.strUserID

UPDATE ELMO_RANK
	Set nRankUP = R.nRank - ELMO_RANK.nRank
	from USER_PERSONAL_RANK R
	where R.strElmoUserID = ELMO_RANK.strUserID

--DELETE FROM USER_PERSONAL_RANK--
--WHERE UpdateDate < @tUpdateDate

INSERT INTO USER_PERSONAL_RANK
	select E.nRank, R.strPosition, E.nRankUP, E.strUserID, E.LoyaltyMonthly, R.nSalary, K.nRankUP, K.strUserID, K.LoyaltyMonthly, R.nSalary, R.nSalary, @tUpdateDate
	from ELMO_RANK E, KARUS_RANK K, USER_PERSONAL_RANK R
	WHERE (E.nRank = K.nRank AND E.nRank = R.nRank and R.UpdateDate < @tUpdateDate)
	ORDER BY E.nRank

DELETE FROM USER_PERSONAL_RANK
WHERE UpdateDate < @tUpdateDate

this one should work for you.
 
Re: Problem with adding PK symbol's

well it worked out to add it but it didn't make sense, I still only have the "dragon symbol" on the top ranked player of each nation like b4. =/

do I have to do something els?
 
I still trying to find out the problem :/ but I don't get it. Nobody knows why my symbols don't wanna show up?..
 
but now I also got the "silver knight" symbol

but I would have some more >,<
 
Back