Access Macro to alter PT2 DB

Any support related posts should go here.

Access Macro to alter PT2 DB

Postby TheRudolf » Thu Nov 06, 2008 11:52 pm

I have a minor issue with my PT2 DB. I have hundreds of SNGs from FT entered by hand as SNG speed/Turbo. The import summaries put the turbos in as SNG 1 table, so I now have > 1000 of those entered. I would like to unify all the data as SNG 1 table. Is there a macro I could write to do it in access, rather than changing 500 table types manually in PT2? Something to the effect of

If (players = 9 and entry fee = $55) then table type = SNG 1 table.

I would really like to have this data unified so I can ananlyse my entire sample. Any help would be appreciated, otherwise I have to muck about in access trying to figure out which values represent the appropriuate flags for PT2.
TheRudolf
 
Posts: 9
Joined: Sat Feb 23, 2008 8:30 pm

Re: Access Macro to alter PT2 DB

Postby ptrack pat » Fri Nov 07, 2008 12:18 am

You would have to use Access to write a SQL update statement to do this. Do you have Access on your computer? Do you know how to write SQL statements to update the database?
ptrack pat
 
Posts: 4841
Joined: Sun Dec 09, 2007 12:38 pm

Re: Access Macro to alter PT2 DB

Postby TheRudolf » Fri Nov 07, 2008 2:31 pm

I do have Access, I am not familiar with SQL statements, but I am sure I can pick it up pretty quickly. I opened the DB up the other day, I know I have to change the tdesc_id values, I am just not sure which table or tables they are kept in, I don't want to corrupt the DB.
TheRudolf
 
Posts: 9
Joined: Sat Feb 23, 2008 8:30 pm

Re: Access Macro to alter PT2 DB

Postby ptrack pat » Fri Nov 07, 2008 3:56 pm

No, that's not the field you need to change.

The id for a SNG 1 Table tourney is a 1, for a SNG Speed/Turbo tourney it is a 9.

So you need to write an update statement that updates the TOURNEY table updating the TABLE_TYPE field from a 1 to a 9 for these tournaments.

Do you have any "normal" SNG tournaments in your database such that you wouldn't want to overwrite those ID values? Or can you just update all of them to be the speed/turbo ID? Is it just FT tournaments you have in this database or are there tournaments from other sites there too?
ptrack pat
 
Posts: 4841
Joined: Sun Dec 09, 2007 12:38 pm

Re: Access Macro to alter PT2 DB

Postby TheRudolf » Fri Nov 07, 2008 7:24 pm

I am going to update them all to be SNG 1 Table, so everything falls into the same table type, as the new games are read in with that table type from the FT summaries. I have SNG from PS and FT, but the FT SNGs are $55+5, and the PS are $50+5. So if I just check for entry fee and player number, I am sure I am on the right tourney, and I can change the value to SNG 1 table.
TheRudolf
 
Posts: 9
Joined: Sat Feb 23, 2008 8:30 pm

Re: Access Macro to alter PT2 DB

Postby ptrack pat » Fri Nov 07, 2008 8:08 pm

First, you better make sure you make a backup of your database file before doing this.

Here is the update query you need to create and run....
================================================


update tourney set table_type = 1
where table_type = 9 and site_id = 11 and buy_in = 55 ;
ptrack pat
 
Posts: 4841
Joined: Sun Dec 09, 2007 12:38 pm

Re: Access Macro to alter PT2 DB

Postby TheRudolf » Mon Nov 24, 2008 12:53 am

Thanks for your help! After much delay I have finally updated all my SNG records and everything seems to be working fine.
TheRudolf
 
Posts: 9
Joined: Sat Feb 23, 2008 8:30 pm


Return to PTH Support

Who is online

Users browsing this forum: No registered users and 0 guests