Quote:
Originally Posted by MyironThumb
hey, I can't seem to figure out how to export my hands from the last 3 weeks into a file. Can this be done?
This is not currently possible in PT3. You can still do this using the following method though (thanks to _dave_).
1. Create a .txt file.
2. Enter the following lines into it.
3. Save the text file as a .cmd file
4. Run the .cmd file
"
PATHNAME\bin\psql" -A -t -d "
DATABASE" -U
USERNAME -c "select history from holdem_hand_histories hhh, holdem_hand_summary hhs where hhh.id_hand = hhs.id_hand and hhs.id_site =
SITENO and hhs.date_played >= '
DATE 00:00:00' order by hhs.hand_no asc;" -o
FILENAME.txt
PATHNAME - This is the pathname to your PostgreSQL directory. I think it's likely to be: C:\Program Files\PostgreSQL 8.3
DATABASE - This is the name of the database you want to extract hands from. This is the PostgreSQL database name, not the PT3 database name. If you go in PT3>Database>Database Management and look at your databases, there will be two names. You want the one from the right column.
USERNAME - This is your PostgreSQL username. If you used the default then it is: postgres
SITENO - This is the site number that PT3 uses. Stars = 100, Party = 200, Full Tilt = 300. I forgot what the rest were. If you played hands from more than one site, you need to recopy all the lines of code for each site.
DATE - This is the start date (inclusive) that you want to export hands from. It should be in the format YYYY-MM-DD.
FILENAME - This is the file that you want to export to. You can put in any name. It doesn't matter.
For example, if my database is called PT3DB and I want to export all of my Stars hands from June into a file called export.txt, it would look like:
"C\Program Files\PostgreSQL 8.3\bin\psql" -A -t -d "PT3DB" -U postgres -c "select history from holdem_hand_histories hhh, holdem_hand_summary hhs where hhh.id_hand = hhs.id_hand and hhs.id_site = 100 and hhs.date_played >= '2008-06-01 00:00:00' order by hhs.hand_no asc;" -o export.txt
Someone please correct me if I made a mistake. I'm not 100% sure if the pathname is supposed to have quotes. If there's no spaces in the pathname, then it doesn't need quotes, but if there are spaces then it's either single or double quotes. I'm pretty sure double quotes are correct.