I'm using Derby and I can't find a way to do case insensitive search.
For example, I have a table that I'm searching that contains "Hello" but I put a search query in for "hello" and at the moment I won't get a result, but I want to.
I can't find the correct syntax for it.
Sara
We need to set the NLS_COMP parameter to LINGUISTIC, which will tell the database to use NLS_SORT for string comparisons. Then we will set NLS_SORT to a case insensitive setting, like BINARY_CI. By default, NLS_COMP is set to BINARY.
By default, searches are case-insensitive. You can make your search case-sensitive by using the case filter. For example, the following search returns only results that match the term HelloWorld . It excludes results where the case doesn't match, such as helloWorld or helloworld . case:yes HelloWorld.
ODBC/JDBC connection to the database is case sensitive in regards to database name.
You can use the UPPER() or LOWER() SQL functions on both your search argument and the field, like in
SELECT *
FROM mytab
WHERE UPPER(lastname) = UPPER('McDonalds')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With