Filter Syntax Error

Discuss how to create custom stats, reports and HUD profiles and share your creations.

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Filter Syntax Error

Postby whiskyjohn » Sat Mar 21, 2015 4:13 pm

Hello,

Can someone please explain why a simple filter expression like:

(cash_hand_player_statistics.holecard_1 % 13 = 6) AND (cash_hand_player_statistics.holecard_2 % 13 = 1)

Is causing a syntax error? See attachment.

There are many such examples. Individually the expression work fine, but when ANDed, they cause the
syntax error. However, if I also include a test like (AND AND cash_limit.amt_bb > 0) then it works fine
again. Presumably, there is some table voodoo I am missing.

Thanks for an explanation,
John
Attachments
syntax error2.jpg
(84.02 KiB) Downloaded 2705 times
whiskyjohn
 
Posts: 248
Joined: Fri Dec 10, 2010 4:12 pm

Re: Filter Syntax Error

Postby whiskyjohn » Sat Mar 21, 2015 4:48 pm

Oh, an interesting update to my post above.

It seems the whitespace after the "AND" is what is causing the problem. All validate, but

These work:

(cash_hand_player_statistics.holecard_1 % 13 = 6) AND(cash_hand_player_statistics.holecard_2 % 13 = 1)

(cash_hand_player_statistics.holecard_1 % 13 = 6)
AND(cash_hand_player_statistics.holecard_2 % 13 = 1)

These do not:

(cash_hand_player_statistics.holecard_1 % 13 = 6) AND (cash_hand_player_statistics.holecard_2 % 13 = 1)

(cash_hand_player_statistics.holecard_1 % 13 = 6)
AND (cash_hand_player_statistics.holecard_2 % 13 = 1)

(cash_hand_player_statistics.holecard_1 % 13 = 6) AND
(cash_hand_player_statistics.holecard_2 % 13 = 1)


How about fixing this so they all work?
John
whiskyjohn
 
Posts: 248
Joined: Fri Dec 10, 2010 4:12 pm

Re: Filter Syntax Error

Postby kraada » Sun Mar 22, 2015 8:18 am

I believe this is in our system to be fixed, but I will alert the developers to your post as that may make the fix easier to put together.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Filter Syntax Error

Postby whiskyjohn » Sun Mar 22, 2015 9:45 am

kraada wrote:I believe this is in our system to be fixed, but I will alert the developers to your post as that may make the fix easier to put together.


Thanks. It should not be too hard to fix. It is just annoying to correct.

Note also that all validate but,

These work:

AND(NOT expression)
AND(NOT(expression))
AND(NOT (expression) )
AND( NOT(expression) )
AND( NOT (expression) )

These do not work:

AND NOT (expression)
AND NOT(expression)
AND (NOT(expression))

I will leave it up to the developers to test more elaborate nested expressions.

John
whiskyjohn
 
Posts: 248
Joined: Fri Dec 10, 2010 4:12 pm

Re: Filter Syntax Error

Postby kraada » Sun Mar 22, 2015 10:15 am

Thanks again, and I'm sure this will help.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Filter Syntax Error

Postby 4StarGen » Sun Mar 22, 2015 10:23 am

plz be aware of another problem I faced.... PT4 doens't like very much uppercase, I found that some expressions with 'AND' doesn't validate while they do with 'and'
4StarGen
 
Posts: 1019
Joined: Sat Mar 08, 2014 6:58 am

Re: Filter Syntax Error

Postby whiskyjohn » Sun Mar 22, 2015 11:07 am

4StarGen wrote:plz be aware of another problem I faced.... PT4 doens't like very much uppercase, I found that some expressions with 'AND' doesn't validate while they do with 'and'


Oh? I haven't noticed that yet. I tend to use "AND" for more generic conditions, but use "and" for the more specific. For example:

cash_hand_player_statistics.flg_p_open_opp
AND(cash_hand_player_statistics.flg_p_first_raise)
AND(cash_hand_player_statistics.holecard_1 % 13 = 0 and cash_hand_player_statistics.holecard_2 % 13 = 0)

i haven't noticed a problem mixing cases this way.
John
whiskyjohn
 
Posts: 248
Joined: Fri Dec 10, 2010 4:12 pm

Re: Filter Syntax Error

Postby 4StarGen » Sun Mar 22, 2015 11:12 am

4StarGen
 
Posts: 1019
Joined: Sat Mar 08, 2014 6:58 am

Re: Filter Syntax Error

Postby whiskyjohn » Sun Mar 22, 2015 2:34 pm



Thanks for the heads up. I haven't created any stats using select. Have you only noticed this problem for a subquery?

John
whiskyjohn
 
Posts: 248
Joined: Fri Dec 10, 2010 4:12 pm

Re: Filter Syntax Error

Postby dave2085 » Mon May 26, 2025 5:22 am

4StarGen wrote:plz be aware of another problem I faced.... PT4 doens't like very much uppercase, I found that some expressions with 'AND' doesn't validate while they do with 'and'


happy to find that thread and that post.

I was pretty confused as i was checking some basic stat

Fold to PF 3Bet After Raise

If I use the expression on a pt4 "my reports" I also had weird syntax error.
After reading this thread (cause I use big "AND"), I just tested with "and".


Code: Select all
cash_hand_player_statistics.enum_p_3bet_action='F' AND cash_hand_player_statistics.flg_p_first_raise

--> syntax error occurs.

Code: Select all
cash_hand_player_statistics.enum_p_3bet_action='F' and cash_hand_player_statistics.flg_p_first_raise

everything works with small "and"


I am jjust using big "AND" to have better overview.
What is recommenced by PT4? Just always use small letters?


PS: also had those issues in the past, I guess this often caused the error ... :?

PPS:
those columns are even protected^^;
cnt_p_3bet_def_opp_when_open_raised
etc.
Actually you should fix that.
dave2085
 
Posts: 202
Joined: Mon Jun 02, 2008 10:41 am


Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 4 guests