<>'X'

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

<>'X'

Postby preparac » Sun Nov 14, 2010 5:45 am

Certainly you already answered this, but I do not find it in the Forums:

What exactly does the substring

substring(lookup_actions_f.action from 1 for 1)<>'X'

mean?

By the way? Is there anywhere a comprehensive list of all the usefull substring functions?
preparac
 
Posts: 323
Joined: Thu May 15, 2008 6:23 am

Re: <>'X'

Postby kraada » Sun Nov 14, 2010 9:36 am

lookup_actions_x.action is the string which defines all actions a player made on that street. It's really the only string in the database you'll want to be doing any functions on. In this case substring() gets the portion of the action string requested - it starts at position 1 and goes for 1 position - so you get just the first character. In this case we're checking to see that it does not equal 'X' - so the player did not check that street. For that particular action, NOT(holdem_hand_player_statistics.flg_f_check) would do the same thing.

You can find more information on string functions in the PostgreSQL documentation on the subject.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: <>'X'

Postby WhiteRider » Sun Nov 14, 2010 10:21 am

There are also some PT3-specific examples of using action strings in the Tutorial: Custom Reports and Statistics. See "string comparisons" in Constructing Column Expressions.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK


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

Who is online

Users browsing this forum: No registered users and 0 guests