A purge query

Forum for users that want to write their own custom queries against the PT database either via the Structured Query Language (SQL) or using the PT3 custom stats/reports interface.

Moderator: Moderators

A purge query

Postby MrFlibble » Tue Jun 17, 2008 6:56 pm

Can anyone help me make a (cash game) purge query? I've the start of one here:
Code: Select all
-- Remove all trace of hand number 5, b1. (replace SELECT * with DELETE of course)
SELECT *
FROM ((((holdem_hand_summary
FULL OUTER JOIN holdem_hand_player_detail
ON holdem_hand_summary.id_hand = holdem_hand_player_detail.id_hand)
FULL OUTER JOIN holdem_hand_player_statistics
ON holdem_hand_summary.id_hand = holdem_hand_player_statistics.id_hand)
FULL OUTER JOIN holdem_hand_histories
ON holdem_hand_summary.id_hand = holdem_hand_histories.id_hand)
FULL OUTER JOIN holdem_hand_player_combinations
ON holdem_hand_summary.id_hand = holdem_hand_player_combinations.id_hand)
WHERE holdem_hand_summary.id_hand = 5


I'm not sure what to do with the holdem_table_session_summary. I think that is the only table that isn't correctly affected by the purge query.

How is that table generated? Is it re-created or adjusted after each import?

If I were to go ahead with the above delete statement how many kittens would die?
MrFlibble
 
Posts: 58
Joined: Sat Mar 08, 2008 7:30 pm
Location: handhq.com for datamined hands

Return to Custom Stats, Reports, and SQL [Read Only]

Who is online

Users browsing this forum: No registered users and 2 guests