Filter with wildcards
Posted: 18.10.2006, 14:36
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.
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
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
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