Report: filter out hero?

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

Report: filter out hero?

Postby js2002 » Sun Jan 24, 2010 10:26 am

...statistics:

#Player# != 'heroname'

doenst work.
js2002
 
Posts: 1502
Joined: Fri Feb 15, 2008 5:44 am
Location: Germany

Re: Report: filter out hero?

Postby WhiteRider » Sun Jan 24, 2010 10:40 am

I came across that a while ago and from my note it looks as if adding another filter too (e.g. filtering to a limit, or probably all limits) might let you get around this until the bug is fixed.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Report: filter out hero?

Postby js2002 » Sun Jan 24, 2010 10:46 am

no, the only one that workarounds :) is filtering out my handcount.
js2002
 
Posts: 1502
Joined: Fri Feb 15, 2008 5:44 am
Location: Germany

Re: Report: filter out hero?

Postby kraada » Sun Jan 24, 2010 9:42 pm

This would do it:

id_hand NOT IN (SELECT id_hand from holdem_hand_player_statistics where holdem_hand_player_statistics.id_player = (SELECT setting_value::int from settings where setting_name = 'my_player_id'))
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Report: filter out hero?

Postby js2002 » Mon Jan 25, 2010 2:44 am

tu
js2002
 
Posts: 1502
Joined: Fri Feb 15, 2008 5:44 am
Location: Germany

Re: Report: filter out hero?

Postby js2002 » Mon Jan 25, 2010 7:38 am

js2002
 
Posts: 1502
Joined: Fri Feb 15, 2008 5:44 am
Location: Germany

Re: Report: filter out hero?

Postby kraada » Mon Jan 25, 2010 10:10 am

No, I meant to copy and paste what I have exactly. my_player_id is the setting name that is used in our database. No alteration is necessary to the above filter.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Report: filter out hero?

Postby js2002 » Mon Jan 25, 2010 10:45 am

same fault
js2002
 
Posts: 1502
Joined: Fri Feb 15, 2008 5:44 am
Location: Germany

Re: Report: filter out hero?

Postby kraada » Mon Jan 25, 2010 12:36 pm

Make sure you have the single quotes as well:
id_hand NOT IN (SELECT id_hand from holdem_hand_player_statistics where holdem_hand_player_statistics.id_player = (SELECT setting_value::int from settings where setting_name = 'my_player_id'))

is EXACTLY how it should look. I tested this and it works fine for me.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Report: filter out hero?

Postby js2002 » Mon Jan 25, 2010 1:37 pm

http://img684.imageshack.us/img684/6774 ... 018351.jpg

Trust me!

EDIT: made another test: column id_hand is ambiguous!
js2002
 
Posts: 1502
Joined: Fri Feb 15, 2008 5:44 am
Location: Germany

Next

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

Who is online

Users browsing this forum: No registered users and 0 guests