Connecting Tech Pros Worldwide Help | Site Map
 
 
LinkBack Thread Tools Search this Thread
  #1  
Old November 12th, 2005, 10:45 AM
seeknew
Guest
 
Posts: n/a
Default Using LOWER function in DB2

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

  #2  
Old November 12th, 2005, 10:45 AM
Mark A
Guest
 
Posts: n/a
Default Re: Using LOWER function in DB2

"seeknew" <smadugula@gmail.com> wrote in message
news:1115549332.917312.324670@g14g2000cwa.googlegr oups.com...[color=blue]
> 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
>[/color]
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.


  #3  
Old November 12th, 2005, 10:45 AM
DA Morgan
Guest
 
Posts: n/a
Default Re: Using LOWER function in DB2

Mark A wrote:
[color=blue]
> DB2 for OS/390 is a different product than DB2 for Linux, Unix, and Windows.[/color]

Exactly.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace 'x' with 'u' to respond)
  #4  
Old November 12th, 2005, 10:45 AM
Mark A
Guest
 
Posts: n/a
Default Re: Using LOWER function in DB2

>> DB2 for OS/390 is a different product than DB2 for Linux, Unix, and[color=blue][color=green]
>> Windows.[/color]
>
> Exactly.
> --
> Daniel A. Morgan[/color]

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


  #5  
Old November 12th, 2005, 10:45 AM
Mark A
Guest
 
Posts: n/a
Default Re: Using LOWER function in DB2

> If one is using DB2 for OS/390, then DB2 for Linux, Unix, and Windows is[color=blue]
> light years more compatible than Oracle.[/color]
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.


  #6  
Old November 12th, 2005, 10:45 AM
seeknew
Guest
 
Posts: n/a
Default Re: Using LOWER function in DB2

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?

  #7  
Old November 12th, 2005, 10:45 AM
Mark A
Guest
 
Posts: n/a
Default Re: Using LOWER function in DB2

"seeknew" <smadugula@gmail.com> wrote in message
news:1115616593.085958.265910@g14g2000cwa.googlegr oups.com...[color=blue]
> 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?
>[/color]
Maybe write your own function, or break the column up into smaller pieces
and convert a piece at a time.


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,164 network members.