Hi,
Context :
Delphi 2007 + MySql 4.1 (Connection protocol : mysql-4.1)
I have one aliased request (see sample) :
SELECT A.field1, A.field2, B.Field1, B.Field2 FROM TableA As A inner join TableB As B on A.KeyField = B.foreignField
If i add this filter : A.field3 like 'my criteria%'
The Filter assignation crash with this message : Unknow symbol ''.''
Witch solution do you have for this problem ?
Best regard,
Filter property problem
Moderators: gto, EgonHugeist
-
- Senior Boarder
- Posts: 93
- Joined: 01.07.2009, 16:07
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
No Almi,
The problems is that you are confusing the filer with a sql 'where' clause.
In a filter the columns should be named the way they are named in the resultset. This means as 'field3' when the field is included in the select. Anther thing to remember is that the like is a special operator in a filter which behaves like this (from a text by Guy Fink):
The problems is that you are confusing the filer with a sql 'where' clause.
In a filter the columns should be named the way they are named in the resultset. This means as 'field3' when the field is included in the select. Anther thing to remember is that the like is a special operator in a filter which behaves like this (from a text by Guy Fink):
MarkThe LIKE-Operator calls the pattern matching function IsMatch.
Examples from the source file :
IsMatch allows unix grep-like pattern comparisons, for instance:
? Matches any single characer
* Matches any contiguous characters
[abc] Matches a or b or c at that position
[^abc] Matches anything but a or b or c at that position
[!abc] Ditto
[a-e] Matches a through e at that position
'ma?ch.*' -Would match match.exe, mavch.dat, march.on, etc
'this [e-n]s a [!zy]est' - Would match 'this is a test',
but would not match 'this as a yest'