Citação Originally Posted by louis Ver Post
print @ipprint @login --mostra o ip e login de quem ganhou

set @test = @test+1 --faz uma contagem de quantas contas ganharam.

Se você fizer uma job pode remover essas linhas sempre problemas
Então Louis,
eu to com este comando na job:
UPDATE memb_info set gold=gold+10
FROM MEMB_INFO JOIN MEMB_STAT ON MEMB_INFO.memb___id = MEMB_STAT.memb___id COLLATE Latin1_general_CI_AI
WHERE (ConnectStat >= 1)
mas da forma q ta, premia todo mundo e por ip ficaria mais bacana. isto é correto?
Use Muonline
Go


Declare @login varchar(20),@ip varchar(20), @test int


set @test = 0
DECLARE LISTA CURSOR LOCAL FOR
SELECT distinct(IP) FROM memb_stat where connectstat=1
OPEN LISTA
FETCH NEXT FROM LISTA INTO @ip
WHILE @@FETCH_STATUS = 0
begin

set @login = (select top 1 memb___id from MEMB_STAT where IP = @ip and ConnectStat=1)


UPDATE memb_info set gold=gold+10 where AccountID = @login