Então Louis,
eu to com este comando na job:
mas da forma q ta, premia todo mundo e por ip ficaria mais bacana. isto é correto?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)
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