SQL coding problem

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

Re: SQL coding problem

Postby daniguru » Thu Apr 18, 2013 2:47 pm

hi krada i guess the problem is the (count suits) code. when i type in this code in the colums section of the custom stats in pokertracker i get always value 1

do you get some values when you are using this code?

holdem_hand_summary.card_1 - ((holdem_hand_summary.card_1 - 1) % 13) = holdem_hand_summary.card_2 - ((holdem_hand_summary.card_2 - 1) % 13)
AND NOT ( holdem_hand_summary.card_1 - ((holdem_hand_summary.card_1 - 1) % 13) = holdem_hand_summary.card_3 - ((holdem_hand_summary.card_3 - 1) % 13))
AND NOT ( holdem_hand_summary.card_1 - ((holdem_hand_summary.card_1 - 1) % 13) = holdem_hand_summary.card_4 - ((holdem_hand_summary.card_4 - 1) % 13))
AND NOT ( holdem_hand_summary.card_1 - ((holdem_hand_summary.card_1 - 1) % 13) = holdem_hand_summary.card_5 - ((holdem_hand_summary.card_5 - 1) % 13))

sorry for my english i just want to know it this code works for you

many thanks
daniel
daniguru
 
Posts: 69
Joined: Mon Aug 11, 2008 10:20 am

Re: SQL coding problem

Postby kraada » Thu Apr 18, 2013 2:59 pm

That should pick out those times where the suit of the first card matches the suit of the second card and the third, fourth and fifth cards do not have the same suit as cards one and two.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: SQL coding problem

Postby daniguru » Thu Apr 18, 2013 3:11 pm

yep but for a rainbow flop for example this code should be ok right?

sum( if[(holdem_hand_summary.card_1 - ((holdem_hand_summary.card_1 - 1) % 13) != holdem_hand_summary.card_2 - ((holdem_hand_summary.card_2 - 1) % 13)
AND ( holdem_hand_summary.card_1 - ((holdem_hand_summary.card_1 - 1) % 13) != holdem_hand_summary.card_3 - ((holdem_hand_summary.card_3 - 1) % 13))
AND ( holdem_hand_summary.card_2 - ((holdem_hand_summary.card_1 - 1) % 13)! = holdem_hand_summary.card_3 - ((holdem_hand_summary.card_3 - 1) % 13))), 1, 0 ])


STRANGE THING IS I ALWAYS GET VALUE 1 HERE NO MATTER WHICH PLAYER I AM TESTING. ANY IDEA?

MANY THANKS :)
daniguru
 
Posts: 69
Joined: Mon Aug 11, 2008 10:20 am

Re: SQL coding problem

Postby kraada » Thu Apr 18, 2013 4:54 pm

Try changing:

)! =
to
) !=

and see if that makes any difference
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: SQL coding problem

Postby daniguru » Thu Apr 18, 2013 9:37 pm

sadly no change does not work. strange is this method works for for example flushpossible turn but not for rainbowflop :?
daniguru
 
Posts: 69
Joined: Mon Aug 11, 2008 10:20 am

Re: SQL coding problem

Postby kraada » Fri Apr 19, 2013 7:29 am

There is no reason this should not work.

Use the bit inside the first section of the if[] statement as a Filter Expression in a custom Hand report and tell me what kinds of hands it returns for you.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Previous

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

Who is online

Users browsing this forum: No registered users and 10 guests

cron
highfalutin