If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > How do i deal with 42907: The string is too long?????

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-10-07, 12:11
fatalerror fatalerror is offline
Registered User
 
Join Date: Nov 2007
Posts: 13
How do i deal with 42907: The string is too long?????

I get an error message
IMPROPER USE OF LONG STRING COLUMN OR AN EXPRESSION THAT RESOLVES TO A LONG STRING KIT_STR. SQLCODE=-134, SQLSTATE=42907

when i try to the following query:

SELECT * FROM Some_table WHERE value_str = v_temp_str;

Here:
value_str is VARCHAR(1500)

Any suggestions or ideas, corrections are welcome
Reply With Quote
  #2 (permalink)  
Old 12-10-07, 12:26
nivasreddy007 nivasreddy007 is offline
Registered User
 
Join Date: Jun 2007
Posts: 66
http://www-1.ibm.com/support/docview...id=swg1IY11811


This link describes your problem..
Reply With Quote
  #3 (permalink)  
Old 12-10-07, 12:28
nivasreddy007 nivasreddy007 is offline
Registered User
 
Join Date: Jun 2007
Posts: 66
He basically says its a program error and such a long varchar cannot be used in joins..Any ideas from other forum members??
Reply With Quote
  #4 (permalink)  
Old 12-10-07, 13:08
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Quote:
Originally Posted by fatalerror
I get an error message
IMPROPER USE OF LONG STRING COLUMN OR AN EXPRESSION THAT RESOLVES TO A LONG STRING KIT_STR. SQLCODE=-134, SQLSTATE=42907

when i try to the following query:

SELECT * FROM Some_table WHERE value_str = v_temp_str;

Here:
value_str is VARCHAR(1500)

Any suggestions or ideas, corrections are welcome
What DB2 version and OS are you using?

Andy
Reply With Quote
  #5 (permalink)  
Old 12-10-07, 13:38
fatalerror fatalerror is offline
Registered User
 
Join Date: Nov 2007
Posts: 13
db2 os/390 7.1.2
Reply With Quote
  #6 (permalink)  
Old 12-10-07, 13:43
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Quote:
Originally Posted by fatalerror
db2 os/390 7.1.2
That is what I thought. You need to post this the first time. I cannot help you as I only know DB2 for LUW.

Andy
Reply With Quote
  #7 (permalink)  
Old 12-11-07, 01:27
umayer umayer is offline
Registered User
 
Join Date: Dec 2005
Posts: 273
Quote:
Originally Posted by fatalerror
SELECT * FROM Some_table WHERE value_str = v_temp_str;
v_temp_str ? Is this a column of the table ?
Reply With Quote
  #8 (permalink)  
Old 12-11-07, 09:42
fatalerror fatalerror is offline
Registered User
 
Join Date: Nov 2007
Posts: 13
it is a string variable. Or you can assume 'abc'
Reply With Quote
  #9 (permalink)  
Old 12-11-07, 10:38
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Could you post us the complete scenario?
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #10 (permalink)  
Old 12-11-07, 10:50
fatalerror fatalerror is offline
Registered User
 
Join Date: Nov 2007
Posts: 13
i have a table called say courselist
eachtime i assign a courseid i query my courselist table to get the courselist column information and assign the id to it which is done as follows:

SELECT count(*) into V_TEMP FROM COURSELIST WHERE COURSELIST_STR = V_COURSELIST;

Last edited by fatalerror; 12-14-07 at 10:03.
Reply With Quote
  #11 (permalink)  
Old 12-14-07, 10:04
fatalerror fatalerror is offline
Registered User
 
Join Date: Nov 2007
Posts: 13
using 'like' will help fix this problem
Reply With Quote
  #12 (permalink)  
Old 12-14-07, 15:20
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Can't you just provide us with some more information that we can actually understand what you try to do? Apparently, you have a sequence of SQL statements. Those may be inside a stored procedure or not - we don't know.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #13 (permalink)  
Old 12-15-07, 19:48
nidm nidm is offline
Registered User
 
Join Date: May 2003
Posts: 113
I think for DB2/zOS v7, the string comparison can only handle 255 bytes or shorter.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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