I would expect that the statement
"SELECT * FROM table WHERE field LIKE "%value%";
would retrieve all records containing 'value' or 'Value' inside the given field.
This is not working using driver version 2010-nov-18.
Could this be fixed?
In the same direction, a more powerful search when dealing, for example, with Latin American accents ('��', '��', '��', '��', '��', etc.) would be ideal. So, an statement like this:
"SELECT * FROM table WHERE field LIKE "%Nom%";
would retrieve all records containing 'Nom', 'Nombre', and also 'N��mina'
could this be added?
Regards.
|
>"SELECT * FROM table WHERE field LIKE "%value%";
>would retrieve all records containing 'value' or 'Value' inside the given field.
Please use ILIKE.
>In the same direction, a more powerful search when dealing, for example, with >Latin American accents ('��', '��', '��', '��', '��', etc.) would be ideal. So, an
>statement like this:
>"SELECT * FROM table WHERE field LIKE "%Nom%";
>would retrieve all records containing 'Nom', 'Nombre', and also 'N��mina'
SELECT * FROM table WHERE field LIKE "%N[o��]m%"
|
Thanks, this solves the issue with accented charaters.
Another situation that is confusing is that the LIKE '%someWord%' returns different results from 'someWord%'. I expect both to return records where the value of the field is exactly 'someWord', but LIKE '%someWork%' misses those records.
In other words, the first % on the LIKE '%someWord%' statement does not include the case for nothing. Could this be fixed on the driver?
|
>LIKE '%someWord%'
AsomeWordB will match. someWord and someWordB will match too.
>Like 'someWord%'.
AsomeWordB will fail. someWord and someWordB will match.
|
Checked.
select 'someWord' like '%someWord%' ;
will return true;
|
My point is that I have found instances where LIKE '%word' behaves different.
For example, I have a table where there are records with the value "COMPRAS\n" (yes a new line char at the end, maybe this is the root of the issue?) in a field, and the following statement
SELECT * FROM table WHERE field LIKE '%compras%';
won't return those records.
If you want need a copy of the database to fix this issue please let me know.
|
Please sent it to support @ hxtt.com
|
I am noticing that the issue is that the LIKE search is case sensitive. Shouldn't it be insensitive? This is the way it works under MS Access, MySQL, etc.
This is why LIKE '%compras%' won't return a record with the value 'COMPRAS' and so on.
I await for your solution.
Thanks
|
>This is the way it works under MS Access, MySQL, etc.
SELECT * FROM table WHERE field ILIKE '%compras%';
|