I want to use the name field, it is data type 'Text'.
If I search 'de graaf' and the name is 'de Graaf' I'm getting no results because it's case sensitive.
My query:
SELECT Name FROM Contact WHERE Name LIKE '%"+ [keyword] +"%' ORDER BY No_
I also tried the @:
SELECT Name FROM Contact WHERE Name LIKE '%@+ [keyword] +%' ORDER BY No_
Where can I find the SQL manual? I have the C/ODBC guide but the answer isn't there.
Comments
If it was hard to write, it should be hard to understand."
If I search 'de graaf' and the name is 'de Graaf' I'm getting no results because it's case sensitive.
My query:
SELECT Name FROM Contact WHERE Name LIKE '%"+ [keyword] +"%' ORDER BY No_
I also tried the @:
SELECT Name FROM Contact WHERE Name LIKE '%@+ [keyword] +%' ORDER BY No_
Where can I find the SQL manual? I have the C/ODBC guide but the answer isn't there.
I developed some site using php and mysql. mysql should be very much the same (the same) as sql. I used this manual :
http://www.mysql.com/doc/en/index.html
here you can find the answer to your question (maybe):
http://www.mysql.com/doc/en/Case_sensitivity.html
Hope it helps
If it was hard to write, it should be hard to understand."
So not al sql functionality is supported.
If that;s not it, then I can't help you any further... sry.
Hope you'll find a solution.
If it was hard to write, it should be hard to understand."
Thanks for your help anyway.
Is there someone else who has the right solution for my problem???
Marco Morreale
<?php
$db = odbc_connect ("Navision", "user", "pass") or die("Unable to connect to ODBC");
$query = "select * from Customer where Name like '$search_str'";
$result = odbc_exec($db, $query);
?>
No matter how I write the search string, it always does a case sensitive search
$search_str = strtoupper($search_str);
$query = "select * from Customer where Search_Name like '$search_str'";
select * from Customer where Search_Name like binary '$search_str'
DOC:
The following two statements illustrate that string comparisons are not case sensitive unless one of the operands is a binary string:
mysql> SELECT 'abc' LIKE 'ABC';
-> 1
mysql> SELECT 'abc' LIKE BINARY 'ABC';
-> 0
SELECT Name FROM Contact WHERE Name LIKE '%"+ [keyword] +"%' COLLATE Latvian_CI_AS ORDER BY No_