You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Onur Aslan <on...@0nur.net> on 2007/07/19 02:46:14 UTC

case-insensitive

Hi. I am using Apache Derby and i am newbie. I have a problem. I am
select some rows with:

"SELECT * FROM parcalar WHERE parca_no LIKE '%onur%'"

But this query is select case-insensitive parca_no values. Like if
parca_no = Onur this query isn't select this row. I want to disable case
insensitive. How can i do this?

Re: case-insensitive

Posted by Kurt Huwig <k....@iku-ag.de>.
Dan Scott schrieb:
> On 18/07/07, Onur Aslan <on...@0nur.net> wrote:
>> Hi. I am using Apache Derby and i am newbie. I have a problem. I am
>> select some rows with:
>>
>> "SELECT * FROM parcalar WHERE parca_no LIKE '%onur%'"
>>
>> But this query is select case-insensitive parca_no values. Like if
>> parca_no = Onur this query isn't select this row. I want to disable case
>> insensitive. How can i do this?
>>
>
> "SELECT * FROM parcalar WHERE LCASE(parca_no) LIKE '%onur%'"
>
> ... should do the trick, although it may be slower than you want.
>
We do another trick by lower-casing the entries upon INSERT.

Re: case-insensitive

Posted by Dan Scott <de...@gmail.com>.
On 18/07/07, Onur Aslan <on...@0nur.net> wrote:
> Hi. I am using Apache Derby and i am newbie. I have a problem. I am
> select some rows with:
>
> "SELECT * FROM parcalar WHERE parca_no LIKE '%onur%'"
>
> But this query is select case-insensitive parca_no values. Like if
> parca_no = Onur this query isn't select this row. I want to disable case
> insensitive. How can i do this?
>

"SELECT * FROM parcalar WHERE LCASE(parca_no) LIKE '%onur%'"

... should do the trick, although it may be slower than you want.

-- 
Dan Scott
Laurentian University