By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,333 Members | 1,226 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,333 IT Pros & Developers. It's quick & easy.

Using LOWER function in DB2

P: n/a
Hi,

Here is the table we are using:

create table testable(testcolA varchar(2000), testcolB varchar(500);

When we query this table using the following query

select LOWER(testcolA) from testable;

we get this error:

SQL0171N The data type, length or value of argument "1" of routine
"LOWER" is incorrect. SQLSTATE=42815

When we query using the below query

select LOWER(testcolB) from testable;

This runs fine without any problem.

The only difference is testcolA is varchar(2000) and testcolB is
varchar(500).

We are using DB2 version

Database server = DB2 OS/390 7.1.1

Here is my question: Is this a bug in the DB2 version we are using. Is
there a fix pack for this? Is there any way to resolve this issue?

We have tested this in windows for version
Database server = DB2/NT 7.1.0
and also in
Database server = DB2/NT 7.2.5.

But we did not get this error.

Any help is appreciated.

Thanks in advance.

Sirinivas

Nov 12 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
"seeknew" <sm*******@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Hi,

Here is the table we are using:

create table testable(testcolA varchar(2000), testcolB varchar(500);

When we query this table using the following query

select LOWER(testcolA) from testable;

we get this error:

SQL0171N The data type, length or value of argument "1" of routine
"LOWER" is incorrect. SQLSTATE=42815

When we query using the below query

select LOWER(testcolB) from testable;

This runs fine without any problem.

The only difference is testcolA is varchar(2000) and testcolB is
varchar(500).

We are using DB2 version

Database server = DB2 OS/390 7.1.1

Here is my question: Is this a bug in the DB2 version we are using. Is
there a fix pack for this? Is there any way to resolve this issue?

We have tested this in windows for version
Database server = DB2/NT 7.1.0
and also in
Database server = DB2/NT 7.2.5.

But we did not get this error.

Any help is appreciated.

Thanks in advance.

Sirinivas

DB2 for OS/390 is a different product than DB2 for Linux, Unix, and Windows.
You need to check the DB2 OS/390 SQL Reference manual, and you will find the
answer to your question.
Nov 12 '05 #2

P: n/a
Mark A wrote:
DB2 for OS/390 is a different product than DB2 for Linux, Unix, and Windows.


Exactly.
--
Daniel A. Morgan
University of Washington
da******@x.washington.edu
(replace 'x' with 'u' to respond)
Nov 12 '05 #3

P: n/a
>> DB2 for OS/390 is a different product than DB2 for Linux, Unix, and
Windows.


Exactly.
--
Daniel A. Morgan


If one is using DB2 for OS/390, then DB2 for Linux, Unix, and Windows is
light years more compatible than Oracle.
Nov 12 '05 #4

P: n/a
> If one is using DB2 for OS/390, then DB2 for Linux, Unix, and Windows is
light years more compatible than Oracle.

Also, DB2 for OS/390 V8 has removed the length restriction on the LOWER
function, so it is now compatible with DB2 for Linux, Unix, and Windows.
Nov 12 '05 #5

P: n/a
Hi Guys, Thank you all very much for the replies. But upgrading to v8
may not be an option for us. Is there anyway we can resolve this issue?

Nov 12 '05 #6

P: n/a
"seeknew" <sm*******@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Hi Guys, Thank you all very much for the replies. But upgrading to v8
may not be an option for us. Is there anyway we can resolve this issue?

Maybe write your own function, or break the column up into smaller pieces
and convert a piece at a time.
Nov 12 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.