I have a SQL command statement that I put together some time ago to run a mass update on my PokerStars notes. It no longer works, and I can't figure out why. Help?
It should update the notes to whatever I designate in quotes (in this case, 'ssnl6 loose 11/23/08') if the following conditions hold true.
site=pokerstars
no notes on players
player has more than 100 hands with 5 or more players in the hand
player has VPIP >=40
game is $2 6max NL or $2 6max PL
update players set general_description = 'ssnl6 loose 11/23/08'
where (players.general_description IS NULL OR players.general_description = '')
AND players.player_id IN
(select b.player_id
from game a, game_players b, game_level c
where a.game_id = b.game_id
and a.site_id = 2
and a.number_of_players >= 5
and a.game_level_id = c.game_level_id
and ((c.game_level_desc = 'NL ($2) (6 max)') OR (c.game_level_desc = 'PL ($2) (6 max)'))
group by b.player_id
having count(*) > 100 and round((sum(vol_put_money_in_pot)*1.0)/(count(*)*1.0), 2) >= 0.40);
