[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


DB2 Case Insensitivity

Posted on 2007-10-04
Medium Priority
Last Modified: 2008-01-09
Is there a command I can use in DB2 to make it case-insensitive?  I'm trying to query a field that contains Last Names...  but it's entered by the user so Smith could be SMITH or Smith or sMITH, etc.  I was using WHERE IN('value','value') but that doesn't seem very efficient.
Question by:z018196
1 Comment
LVL 18

Accepted Solution

Dave Ford earned 2000 total points
ID: 20017804

Well, the easiest method is to use the UPPER function.

where upper(myColumn) = 'VALUE'

But, that method may cause performance problems since it makes any index over myColumn unusable. (You'll have to test how much of a performance problem it is. Depending on your query, it may not affect it at all.)

Alternately (at least on DB2 for iSeries), you can specify your data and queries to use a sort-sequence of LANGIDSHR.  That causes all SELECT's to be case-insensitive.


Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
In this modest contribution, I want to share with the IT community (especially system administrators, IT Support Engineers and IT Help Desks) about Windows crashes/hangs and how to deal with these particular problems.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question