Report text string filter?

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

Report text string filter?

Postby js2002 » Tue Oct 26, 2010 9:56 am

#Notes# = "random text"

not valid?! how do I do it?
js2002
 
Posts: 1502
Joined: Fri Feb 15, 2008 5:44 am
Location: Germany

Re: Report text string filter?

Postby kraada » Tue Oct 26, 2010 11:44 am

notes.notes = "string here" should do it I believe. You can also use LIKE and SIMILAR if you need, but if you have a lot of notes it could take a while.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Report text string filter?

Postby js2002 » Tue Oct 26, 2010 12:03 pm

not valid

notes.notes = 'test' works, but the result fails! filter doesnt work like that

with LIKE there are the same problems: '' valid but fails "" not valid
js2002
 
Posts: 1502
Joined: Fri Feb 15, 2008 5:44 am
Location: Germany

Re: Report text string filter?

Postby js2002 » Tue Oct 26, 2010 12:14 pm

Well I see in the column section, there it works but doesnt filter the correct thing.
If the string is existing anywhere a report comes if the string is nowhere no report comes.
js2002
 
Posts: 1502
Joined: Fri Feb 15, 2008 5:44 am
Location: Germany

Re: Report text string filter?

Postby kraada » Tue Oct 26, 2010 1:17 pm

Sorry I should have used 's not "s - how do you mean that it "doesn't filter the correct thing"? What results do you get?
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Report text string filter?

Postby js2002 » Tue Oct 26, 2010 1:26 pm

notes.notes = 'test' ====== SHOWS A REPORT LIST

notes.notes = 'tessssssssssssssst' ====== SHOWS AN EMPTY REPORT LIST

There is a note "test" at one hand.

The word 'test' doesnt filter the list to the one note with the test entry, understand?
js2002
 
Posts: 1502
Joined: Fri Feb 15, 2008 5:44 am
Location: Germany

Re: Report text string filter?

Postby kraada » Tue Oct 26, 2010 2:37 pm

After a little further investigation it looks like our query generator isn't joining quite properly in this instance.

Add the following filter as well as the comparison you already have and it should work properly for you then:
(notes.id_x = holdem_hand_player_statistics.id_hand) AND (notes.enum_type = 'HH')

(Note that if you wanted to make a similar searching version for player notes, you'd want to have notes.id_x = holdem_hand_player_statistics.id_player and notes.enum_type = 'P'.)
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Report text string filter?

Postby js2002 » Tue Oct 26, 2010 2:50 pm

kraada wrote:After a little further investigation it looks like our query generator isn't joining quite properly in this instance.

Add the following filter as well as the comparison you already have and it should work properly for you then:
(notes.id_x = holdem_hand_player_statistics.id_hand) AND (notes.enum_type = 'HH')

(Note that if you wanted to make a similar searching version for player notes, you'd want to have notes.id_x = holdem_hand_player_statistics.id_player and notes.enum_type = 'P'.)


U may not believe me but:
I took a look into the tables in pgadmin and saw the columns and tables, so I thought "hmmm I have to use the id in conclusion with the wanted string" but how do T write the pt3 code? hmmm", then u posted the id part! nice!
I ll try it now...

EDIT:
WORKS tu

ps do u have a another idea:
User wanted to see some notes of some sessions, I I suggested to make it by this filter.
js2002
 
Posts: 1502
Joined: Fri Feb 15, 2008 5:44 am
Location: Germany

Re: Report text string filter?

Postby kraada » Tue Oct 26, 2010 4:04 pm

You're welcome.

For session notes, you want enum_type = 'HS' (holdem session).
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY


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

Who is online

Users browsing this forum: No registered users and 0 guests