Page 1 of 1

Filter with wildcards

Posted: 18.10.2006, 14:36
by mcb
Hi,
I use Delphi7, Zeos-Libs 6.1.5, Firebird 1.5.3 Classic Server.
I have declared a Table 'ADRESSEN' with a varchar(5) field (KUERZEL) . I use a query (Select NAME, KUERZEL from ADRESSEN) to get the data and then I use a filter.

Code: Select all

Exampleoutput table:
rno   NAME  KUERZEL
1      n1   aabcd
2      n2   aabce
3      n3   aabdc
4      n4   abcd

Code: Select all

applied filter and results:

         filter               resultrecords nrs    I expected 
1)   KUERZEL like '*d*'        3,4                   1,3,4 
2)   KUERZEL like '*d'         1,2,3,4 (all)         1 
3)   KUERZEL like '????d'      1                     1          
4)   KUERZEL like '*cd*'       1,2                   1,2 
5)   KUERZEL like '*cd'        1                     1 
6)   KUERZEL like '*cd*'       1,4                   1,4
As you can see in the examples I dont get the expected record(s) when I use a Filter with one char that should stand at the end of a string (example 2), or dont get all matching records (example 1). If i use the two last chars (example 5) I get that record.
Is it a feature? Or am I doing something wrong? I know, I can also filter the output direct in the query with a where clause what seems to work, but this is an extract of a much bigger query where i intensively use filtering, because otherwise Im building very often new queries asking the server without changed data.

Has someone an idea?

Greetings McB

Posted: 20.02.2007, 14:57
by vileda
Hi,

i have the same problem using ZEOS 6.6.0 beta and firebird 2.0.
when i try to set the filter like this "NAME like *o" i get all rows.
Thats not expected.
But filter "NAME like *e*" works as expected for values like "leo".