467,923 Members | 1,858 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

DB2 Clob Serach case insensitive

Hello DB2 Experts,
I have a Clob column and I need to search for a String in that.
Case insensitive search.

I tried,
select * from MyTable where UPPER(varchar(CLOB_COLUMN)) LIKE
'%some-data%'

[IBM][CLI Driver][DB2] SQL0171N The data type, length or value of
argument "1" of routine "UPPER" is incorrect. SQLSTATE=42815

DB2 version: DB2 on OS/390 07.01.0001
Appreciate any help.
Thanks,
Srini.
Nov 12 '05 #1
  • viewed: 7665
Share:
3 Replies
sr******@yahoo.com (Srini) wrote in message news:<23**************************@posting.google. com>...
Hello DB2 Experts,
I have a Clob column and I need to search for a String in that.
Case insensitive search.

I tried,
select * from MyTable where UPPER(varchar(CLOB_COLUMN)) LIKE
'%some-data%'

[IBM][CLI Driver][DB2] SQL0171N The data type, length or value of
argument "1" of routine "UPPER" is incorrect. SQLSTATE=42815

DB2 version: DB2 on OS/390 07.01.0001
Appreciate any help.
Thanks,
Srini.

In "DB2 Universal Database for OS/390 and z/OS SQL Reference Version
7", for UCASE or UPPER function, it says that "string-expression .....
A character string argument ..... and must have an actual length that
is not greater than 255."

So, it seems that you can not change a string longer than 255 to upper
case with one UPPER or one TRANSLATE function.
Nov 12 '05 #2
Tokunaga, Thank you for your quick response.
Are there any other options OR is it Impossible to do case insensitive
search on DB2 Clob columns [DB2 on os/390 ver 7.1]

Thanks,
Srini.
Nov 12 '05 #3
Srini wrote:
Tokunaga, Thank you for your quick response.
Are there any other options OR is it Impossible to do case insensitive
search on DB2 Clob columns [DB2 on os/390 ver 7.1]


You could write your own UDF.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by freak | last post: by
32 posts views Thread by Elliot Temple | last post: by
12 posts views Thread by Relaxin | last post: by
14 posts views Thread by Christian Sell | last post: by
3 posts views Thread by db2admin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.