Hello,
I'm getting a "The Statement is not valid SQL" popup, upon trying to save the following column. Can you help me correct it, please?
Please note the code is tested & works on "My Report/filters/edit expression filters" section.
Thanks
sum(if[(((((((case when(char_length(lookup_actions_f.action) < 1) then '' else (substring(lookup_actions_f.action from 1 for 1)) end) = 'X'))AND (((case when(char_length(lookup_actions_f.action) < 2) then '' else (substring(lookup_actions_f.action from 2 for 1)) end) = 'R')))))AND (((((cash_hand_summary.cnt_players_f BETWEEN 2 and 2)))))AND ((cash_hand_summary.card_1 > 0 and ((cash_hand_summary.card_1 % 13 = cash_hand_summary.card_2 % 13) OR (cash_hand_summary.card_1 % 13 = cash_hand_summary.card_3 % 13) OR (cash_hand_summary.card_2 % 13 = cash_hand_summary.card_3 % 13))))AND ((NOT (((((cash_hand_summary.card_1 > 0 and cash_hand_summary.card_1 % 13 = cash_hand_summary.card_2 % 13 and cash_hand_summary.card_2 % 13 = cash_hand_summary.card_3 % 13)))))))AND (((NOT (((((cash_hand_summary.card_1 % 13 != cash_hand_summary.card_2 % 13 and cash_hand_summary.card_1 % 13 != cash_hand_summary.card_3 % 13 and cash_hand_summary.card_2 % 13 != cash_hand_summary.card_3 % 13 and (((cash_hand_summary.card_1 % 13 = 0 OR cash_hand_summary.card_2 % 13 = 0 OR cash_hand_summary.card_3 % 13 = 0) AND ((cash_hand_summary.card_1 % 13 BETWEEN 0 and 4 and cash_hand_summary.card_2 % 13 BETWEEN 0 and 4 and cash_hand_summary.card_3 % 13 BETWEEN 0 and 4) OR ((cash_hand_summary.card_1 - 1) % 13 BETWEEN 8 and 12 and (cash_hand_summary.card_2 - 1) % 13 BETWEEN 8 and 12 and (cash_hand_summary.card_3 - 1 % 13 BETWEEN 8 and 12)))) OR (cash_hand_summary.card_2 % 13 BETWEEN ((cash_hand_summary.card_1 % 13) + 1) and ((cash_hand_summary.card_1 % 13) + 4) AND cash_hand_summary.card_3 % 13 BETWEEN ((cash_hand_summary.card_1 % 13) + 1) and ((cash_hand_summary.card_1 % 13) + 4)) OR (cash_hand_summary.card_1 % 13 BETWEEN ((cash_hand_summary.card_2 % 13) + 1) and ((cash_hand_summary.card_2 % 13) + 4) AND cash_hand_summary.card_3 % 13 BETWEEN ((cash_hand_summary.card_2 % 13) + 1) and ((cash_hand_summary.card_2 % 13) + 4)) OR (cash_hand_summary.card_2 % 13 BETWEEN ((cash_hand_summary.card_3 % 13) + 1) and ((cash_hand_summary.card_3 % 13) + 4) AND cash_hand_summary.card_1 % 13 BETWEEN ((cash_hand_summary.card_3 % 13) + 1) and ((cash_hand_summary.card_3 % 13) + 4))))))))))AND ((NOT (((((cash_hand_summary.card_1 > 0 and cash_hand_summary.card_1 - ((cash_hand_summary.card_1 - 1) % 13) = cash_hand_summary.card_2 - ((cash_hand_summary.card_2 - 1) % 13) and cash_hand_summary.card_2 - ((cash_hand_summary.card_2 - 1) % 13) = cash_hand_summary.card_3 - ((cash_hand_summary.card_3 - 1) % 13)))))))))AND ((NOT (((((length(cash_hand_summary.str_aggressors_p) = 1)))))))AND ((NOT (((((cash_hand_player_combinations.id_gametype = 1 and (cash_hand_player_combinations.flg_f_straight_draw OR cash_hand_player_combinations.flg_f_2gutshot_draw))))))))AND ((NOT (((((cash_hand_player_combinations.flg_f_flush_draw)))))))AND (((((cash_hand_player_statistics.flg_f_first)))))AND ((((((cash_hand_player_combinations.flg_f_threeoak AND cash_hand_player_combinations.val_f_hole_cards_used = 1 AND cash_hand_player_combinations.id_f_hand_strength BETWEEN 1 and 3)))))OR (((((cash_hand_player_combinations.flg_f_fullhouse and cash_hand_player_combinations.id_f_hand_strength BETWEEN 6 and 7)))))OR (((((cash_hand_player_combinations.flg_f_fullhouse AND cash_hand_player_combinations.id_f_hand_strength in (1,2,3,8,9)))))))AND (((((((cash_hand_player_statistics.flg_p_first_raise and cash_hand_player_statistics.flg_p_open_opp)))))AND (((case when(char_length(lookup_actions_p.action) < 1) then '' else (substring(lookup_actions_p.action from 1 for 1)) end) = 'R'))AND ((NOT ((lookup_actions_p.action LIKE '__%')))))OR ((((((cash_hand_player_statistics.cnt_p_face_limpers > 0)))))AND (((case when(char_length(lookup_actions_p.action) < 1) then '' else (substring(lookup_actions_p.action from 1 for 1)) end) = 'R'))AND ((NOT ((lookup_actions_p.action LIKE '__%'))))))AND ((cash_hand_player_statistics.val_f_bet_facing_pct BETWEEN 31.00 and 1000.00))AND ((((((lookup_actions_f.action LIKE '___%')))))OR (((((lookup_actions_t.action LIKE '_%'))))))), 1, 0])