Filter with wildcards

Forum related to Firebird

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
mcb
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: 09.02.2006, 16:36

Filter with wildcards

Post 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
vileda
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 20.02.2007, 14:52
Contact:

Post 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".
Post Reply