Simple SQL Query to Change Date

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

Simple SQL Query to Change Date

Postby stinkpaw » Wed Feb 17, 2010 10:25 pm

I started a session on 12/31/2009 and ended up with one hand in that session being played on 1/1/2010. As others have noted, PT3 doesnt handle multi-day sessions well when it comes to filters.

I would like to change the date of the hand to 12/31/2009 23:59 so it is considered a 2009 hand. I am in the Easter timezone. The Date column on the PT hands grid screen is 2010/01/01 00:07. When I query the hand in the holdem_hand_summary table, the date_played field is 2010-01-01 05:07.

I did a SQL update command to change the value in the date_played field, but it did not change the value in the Date column on the grid. I all housekeeping functions and it did not help.

Any ideas?
stinkpaw
 
Posts: 14
Joined: Sun Apr 13, 2008 7:45 am

Re: Simple SQL Query to Change Date

Postby kraada » Thu Feb 18, 2010 11:43 am

The Sessions - Details grid goes by session start time only - that hand won't make a difference for that grid.

What command did you use to update the date_played column? That should be the one used on the Hands tab as far as I can tell.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Simple SQL Query to Change Date

Postby stinkpaw » Thu Mar 04, 2010 10:45 pm

I executed the following SQL:

update holdem_hand_summary
set date_played = '2009-12-31 23:59:45' where hand_no = 17238919898

When I set the filter to Played This Year, the hand is included in some areas and not in others:

Hand Not Included
- General tab.
- Sessions tab (the session started in 2009 so it should be excluded.)
- Winnings tab.

Hand Included
- Detail tab.
- Hands tab. The value in the Date column is 2010/01/01 00:07. Note: When I replay the hand and select the Hand Details tab it shows 2009/12/31 for the date.
- Positions tab.
- All graphs.

So obviously there is another date field I need to change but I dont know where it is.
stinkpaw
 
Posts: 14
Joined: Sun Apr 13, 2008 7:45 am

Re: Simple SQL Query to Change Date

Postby WhiteRider » Fri Mar 05, 2010 5:27 am

You have updated the date of the hand, but not of the session that the hand is part of.
That is stored in holdem_table_session_summary.date_start (and date_end).
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK


Return to PostgreSQL [Read Only]

Who is online

Users browsing this forum: No registered users and 28 guests

cron
highfalutin