Delete all playernotes

PostgreSQL is the database server used to store information. Do you have a question or are you having problem with PostgreSQL? If so, post them here.

Moderator: Moderators

Delete all playernotes

Postby Olaf72 » Tue Aug 09, 2011 12:06 pm

Is there a way to delete all playernotes from a PT3 Database via a SQL?
Olaf72
 
Posts: 50
Joined: Fri Jan 30, 2009 10:29 am

Re: Delete all playernotes

Postby WhiteRider » Tue Aug 09, 2011 3:15 pm

I don't think there's a simple query because the notes are linked into other tables in the database, but I'll see if I can find out for you.
WhiteRider
Moderator
 
Posts: 54017
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Delete all playernotes

Postby kraada » Sun Aug 14, 2011 8:54 am

There is:

TRUNCATE TABLE notes;
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Delete all playernotes

Postby kraada » Mon Aug 29, 2011 8:40 am

I realized I forgot a couple of other queries you might want to run. That query blanks out all notes, but there are still flags set for notes on individual hands and players.

To change it to false for all players run:

UPDATE player SET flg_note = FALSE;

To set it to false for all hands run:

UPDATE holdem_hand_summary SET flg_note = FALSE;

(that's for holdem cash hands, for tournament or omaha hands change the table accordingly)
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY


Return to PostgreSQL [Read Only]

Who is online

Users browsing this forum: No registered users and 28 guests

cron
highfalutin