Connecting Tech Pros Worldwide Help | Site Map
 
 
LinkBack Thread Tools Search this Thread
  #1  
Old November 12th, 2005, 07:24 AM
erkki
Guest
 
Posts: n/a
Default Like operand and case sensitivity

Hi,

is there some DB parameter or JDBC driver property that says 'LIKE'
search should not be case sensitive?

I use DB2 Express 8.1.5 and Websphere 5.0.2. I don't use WAS
Connectionpool in this case.

UCASE(fieldname) is not an option.

  #2  
Old November 12th, 2005, 07:24 AM
Knut Stolze
Guest
 
Posts: n/a
Default Re: Like operand and case sensitivity

erkki wrote:
[color=blue]
> Hi,
>
> is there some DB parameter or JDBC driver property that says 'LIKE'
> search should not be case sensitive?
>
> I use DB2 Express 8.1.5 and Websphere 5.0.2. I don't use WAS
> Connectionpool in this case.
>
> UCASE(fieldname) is not an option.[/color]

Why is this not an option?

You could:
(a) insert only upper case values in your tables
(b) use your own functions as described here
http://www.ibm.com/developerworks/db...301stolze.html

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
  #3  
Old November 12th, 2005, 07:24 AM
erkki
Guest
 
Posts: n/a
Default Re: Like operand and case sensitivity

Hi,

I just wanted to be sure that there is no similiar way in DB2Express
like there is in iSeries. In iSeries you can do that with driver properties.

I have done this think with UCASE and it works fine. And after searching
all around www I am quite sure now that DB2 can not do like search case
insensitive way...

The problem is that my application runs on iSeries or DB2 database, and
that iSeries does some extra work now with that UCASE function. It
really don't need to do so.

Well of course I could write my code that way it checks whether database
reside on iSeries and if so sql can be executed without UCASE()...

Knut Stolze wrote:[color=blue]
> erkki wrote:
>
>[color=green]
>>Hi,
>>
>>is there some DB parameter or JDBC driver property that says 'LIKE'
>>search should not be case sensitive?
>>
>>I use DB2 Express 8.1.5 and Websphere 5.0.2. I don't use WAS
>>Connectionpool in this case.
>>
>>UCASE(fieldname) is not an option.[/color]
>
>
> Why is this not an option?
>
> You could:
> (a) insert only upper case values in your tables
> (b) use your own functions as described here
> http://www.ibm.com/developerworks/db...301stolze.html
>[/color]

  #4  
Old November 12th, 2005, 07:24 AM
Blair Adamache
Guest
 
Posts: n/a
Default Re: Like operand and case sensitivity

We had a fix in DB2 v7 to address this - you'd need to contact IBM
Service to get this forward fit into v8 if it met your needs:

Defect number - IY13707

NEW PATCH2=41 IN CLI TO HELP USERS DO CASE INSENSITIVE QUERIES:
VIEWS HAS TO BE CREATED ON A TABLE TO UPPER CASE EVERYTHING, THE

ERROR DESCRIPTION:
new PATCH2=41 in CLI to help users do case insensitive queries:
views has to be created on a table to Upper case everything,
then with above PATCH cli will convert all literals upper case
too.

erkki wrote:
[color=blue]
> Hi,
>
> is there some DB parameter or JDBC driver property that says 'LIKE'
> search should not be case sensitive?
>
> I use DB2 Express 8.1.5 and Websphere 5.0.2. I don't use WAS
> Connectionpool in this case.
>
> UCASE(fieldname) is not an option.
>[/color]

  #5  
Old November 12th, 2005, 07:24 AM
Blair Adamache
Guest
 
Posts: n/a
Default Re: Like operand and case sensitivity

You can aslo use generated columns that store each value in upper case.

erkki wrote:
[color=blue]
> Hi,
>
> I just wanted to be sure that there is no similiar way in DB2Express
> like there is in iSeries. In iSeries you can do that with driver
> properties.
>
> I have done this think with UCASE and it works fine. And after searching
> all around www I am quite sure now that DB2 can not do like search case
> insensitive way...
>
> The problem is that my application runs on iSeries or DB2 database, and
> that iSeries does some extra work now with that UCASE function. It
> really don't need to do so.
>
> Well of course I could write my code that way it checks whether database
> reside on iSeries and if so sql can be executed without UCASE()...
>
> Knut Stolze wrote:
>[color=green]
>> erkki wrote:
>>
>>[color=darkred]
>>> Hi,
>>>
>>> is there some DB parameter or JDBC driver property that says 'LIKE'
>>> search should not be case sensitive?
>>>
>>> I use DB2 Express 8.1.5 and Websphere 5.0.2. I don't use WAS
>>> Connectionpool in this case.
>>>
>>> UCASE(fieldname) is not an option.[/color]
>>
>>
>>
>> Why is this not an option?
>>
>> You could:
>> (a) insert only upper case values in your tables
>> (b) use your own functions as described here
>> http://www.ibm.com/developerworks/db...301stolze.html
>>
>>[/color]
>[/color]

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,248 network members.