Problem 1:
This filter works: fieldname like "value*"
This filter does not work: fieldname like "*value*"
What am I doing wrong here?
Problem 2:
I have the following sql loaded in the TzQuery:
SELECT.. table1.name, table2.name,.. FROM ... INNER JOIN table1.. table2
Works fine, but when I add a filter of the following form, the "." is not accepted:
Filter: (table1.name like "value*") OR (table2.name like "value*")
How can I define a filert with redundant field names?
TZQuery.Filter problems
Re: TZQuery.Filter problems
Can nobody help me? Am I the only one with these filter problems?
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
Re: TZQuery.Filter problems
Without deeper study I can't answer your first question. But try debugging the IsMatch function in core\ZMatchPattern.pas.
For the second question: filters never become part of the query statement, so sql syntax doesn't work. You should give the result columns of your queries a unique name like
SELECT.. table1.name as name1, table2.name as name2,.. FROM ... INNER JOIN table1.. table2
Then your filter can reference the field names name1 and name2.
Mark
For the second question: filters never become part of the query statement, so sql syntax doesn't work. You should give the result columns of your queries a unique name like
SELECT.. table1.name as name1, table2.name as name2,.. FROM ... INNER JOIN table1.. table2
Then your filter can reference the field names name1 and name2.
Mark