I did find a way that doesn't seem to be conflicting, however that
SQL bug I was talking about where if an opponent has the
same EXACT screenname on PokerStars and Fulltilt, keeps getting in the way more than I thought.
Heres the basic version of the SQL statement:
My Report only contains the 'player' name stat to simplify things.
- Code: Select all
( 0 < (SELECT count(hhps2.id_hand) FROM omaha_hand_player_statistics hhps2 WHERE hhps2.id_hand = omaha_hand_player_statistics.id_hand AND hhps2.id_player =
(SELECT p.id_player FROM player p WHERE player_name_search='opponent' )) )
Here's the log error:
2009/12/29 12:17:48.390: [00000884][Query] Executing SQL (Thread): SELECT (player.player_name) as "str_player_name" FROM omaha_hand_player_statistics , player WHERE (player.id_player = omaha_hand_player_statistics.id_player) AND (omaha_hand_player_statistics.id_player = 1) AND (( ( 0 < (SELECT count(hhps2.id_hand) FROM omaha_hand_player_statistics hhps2 WHERE hhps2.id_hand = omaha_hand_player_statistics.id_hand AND hhps2.id_player = (SELECT p.id_player FROM player p WHERE player_name_search='opponent' )) ) )) GROUP BY (player.player_name)
2009/12/29 12:17:48.421: [00000884][PostgresConnection (Error)] Unable to execute query: SELECT (player.player_name) as "str_player_name" FROM omaha_hand_player_statistics , player WHERE (player.id_player = omaha_hand_player_statistics.id_player) AND (omaha_hand_player_statistics.id_player = 1) AND (( ( 0 < (SELECT count(hhps2.id_hand) FROM omaha_hand_player_statistics hhps2 WHERE hhps2.id_hand = omaha_hand_player_statistics.id_hand AND hhps2.id_player = (SELECT p.id_player FROM player p WHERE player_name_search='opponent' )) ) )) GROUP BY (player.player_name) ; Reason: Fatal Error (ERROR: more than one row returned by a subquery used as an expression )