473,386 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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.

Nov 12 '05 #1
4 8098
erkki wrote:
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.


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
Nov 12 '05 #2
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:
erkki wrote:

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.

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


Nov 12 '05 #3
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:
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.


Nov 12 '05 #4
You can aslo use generated columns that store each value in upper case.

erkki wrote:
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:
erkki wrote:

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.


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


Nov 12 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: NK | last post by:
Hi all, Does anyone know of how I can disable case sensitivity for the LIKE function in SQL? Currently the SQL statement looks like: $query = "SELECT * FROM itrader_games WHERE...
32
by: Elliot Temple | last post by:
Hi I have two questions. Could someone explain to me why Python is case sensitive? I find that annoying. Also, why aren't there multiline comments? Would adding them cause a problem of some...
761
by: Neo-LISPer | last post by:
Hey Recently, I researched using C++ for game programming and here is what I found: C++ game developers spend a lot of their time debugging corrupted memory. Few, if any, compilers offer...
9
by: orljustin | last post by:
Hi, I'm trying to check the existance of a file in Windows 2000 by opneing am fstream and seeing if it is open. However, it seems that the executable doesn't care about case. ie, if I am...
6
by: bigbob | last post by:
Okay, back in the day, when dinosaurs and TTYs ruled the world, it made sense to be as concise as possible. Fast forward to the 21st century, and we get a brand new language with case sensitive...
16
by: Starwiz | last post by:
I'm a VB.net programmer, and I'm about to start working with two C++ programmers and teach them .net. I've decided to use C# in teaching them, since it's similar enough to VB.net that I can read...
1
by: othellomy | last post by:
Is SQL server defaults to case insensitive? I am sure there are ways to install case sensitive SQL server instance but coming from Sybase (which is always case sensitive) case insensitivity is...
3
by: Anita Potekkat | last post by:
Hello, I had a question regarding Case Sensitivity in 10g & 9i. (1) Does Case Sensitivity in Oracle have to do with data only? Or does it also effect table & column names? For e.g. in a table...
2
by: sweetpotatop | last post by:
Hi, I believe my SQL server was configured as Case sensitivity. I have a number of stored procedures which were moved from a non-Case sensitivity SQL server. Because of the Case sensitivity, I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.