a question about substring

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

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

a question about substring

Postby husngforfood » Thu Jun 21, 2012 9:06 am

This is the definition of a built in column named: cnt_f_donk_def_opp_action_fold

sum(if[lookup_actions_p.action LIKE '%R' AND tourney_hand_player_statistics.amt_f_bet_facing > 0 AND NOT (tourney_hand_player_statistics.flg_f_open_opp) AND substring(lookup_actions_f.action from 1 for 1) = 'F', 1, 0])

Why is substring used here? Wouldn't it mean the same if we used: lookup_actions_f.action LIKE 'F'?
husngforfood
 
Posts: 83
Joined: Wed Mar 21, 2012 4:03 am

Re: a question about substring

Postby kraada » Thu Jun 21, 2012 10:05 am

Well, given that it's a substring for a fold it won't make a difference - since fold is always the last action. But if it were substring(from 1 for 1) = 'B' then it would be like 'B%' - all we're testing is that the first letter is B, anything else could come after.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY


Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 27 guests

cron