470,604 Members | 2,121 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,604 developers. It's quick & easy.

case insensitive select

Is there a way to achieve that a select against a database will be case
insensitive?

Meaning that 'select ' from tab1 where col1 = 'abc'' will return the same
result as 'select ' from tab1 where col1 = 'ABC'' . I know the functions
UCASE and LCASE (and TRANSLATE), but this is not what I'm after now. I am
looking for some kind of parameter (on the client or the database server)
that will achieve this.

I'm told that this is possible on both Oracle and Sql Server. But what
about db2?

Regards
Odd B Andersen
ErgoGroup AS
Jan 24 '06 #1
1 1817
Odd Bjørn Andersen wrote:
Is there a way to achieve that a select against a database will be case
insensitive?

Meaning that 'select ' from tab1 where col1 = 'abc'' will return the same
result as 'select ' from tab1 where col1 = 'ABC'' . I know the functions
UCASE and LCASE (and TRANSLATE), but this is not what I'm after now. I am
looking for some kind of parameter (on the client or the database server)
that will achieve this.

I'm told that this is possible on both Oracle and Sql Server. But what
about db2?

There is no database wide parameter. You can handle case insensitivity
per column using GENERATED columns.
If you want teh whoel database to be case insensitive, why not just
normalize the data to all upper or lower caps?

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
DB2 UDB for Linux, Unix, Windows
IBM Toronto Lab
Jan 24 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by cowboyx | last post: by
12 posts views Thread by Relaxin | last post: by
1 post views Thread by iksando | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.