Help filtering column using str_actors_p

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

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Help filtering column using str_actors_p

Postby JackOscar95 » Sun Apr 30, 2023 11:22 am

I'm trying to create a column equivalent to "cnt_p_4bet_def_action_fold_after_3b" but for a specific configuration, e.g. BvB.

What I'm trying is the below but I can't get it to work, the third row is my addition:

sum(if[
cash_hand_player_statistics.flg_p_3bet AND
cash_hand_player_statistics.enum_p_4bet_action = 'F' AND
cash_hand_summary.str_actors_p = 989
, 1, 0])

I think the problem is perhaps that I'm using two different tables but I've seen this work before. It just gives me a "The statement is not valid SQL" error.


Edit: I tried casting it as INT (CAST(cash_hand_summary.str_actors_p AS INT)= 989) and now it doesn't give an error. Is this the right workaround?
JackOscar95
 
Posts: 15
Joined: Fri Aug 28, 2020 1:10 pm

Re: Help filtering column using str_actors_p

Postby JackOscar95 » Sun Apr 30, 2023 12:19 pm

Realized I needed first 3 digits of str_actors_p to match only so had to do this:

sum(if[
cash_hand_player_statistics.flg_p_3bet AND cash_hand_player_statistics.enum_p_4bet_action = 'F' AND
CAST(cash_hand_summary.str_actors_p AS VARCHAR) LIKE '080%'
, 1, 0])



Seems to work.
JackOscar95
 
Posts: 15
Joined: Fri Aug 28, 2020 1:10 pm

Re: Help filtering column using str_actors_p

Postby WhiteRider » Sun Apr 30, 2023 12:21 pm

Yes, that's the sort of thing you need to do. You shouldn't need to cast it though, because it is already a string, which is what the problem would be with your first try.
WhiteRider
Moderator
 
Posts: 54017
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK


Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 51 guests

cron