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 > substring in db2 procedure

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-09-09, 07:27
vivek.vivek vivek.vivek is offline
Registered User
 
Join Date: Jan 2009
Posts: 27
Question substring in db2 procedure

I am using substring like this in db2 procedure

SET cur_string = 'SUBSTR(remainder1,0,cur_position-1)';

Here remainder1 is "Test_0001,Test_0002" and
cur_position is the position of "," in remainder 1
But this was showing error. I searched and got the information that the length should start from 1. So i changed to
SET cur_string = 'SUBSTR(remainder1,1,cur_position-1)';

But it is again showing 22011 error. I removed the single quotes too. But no way. Please help me in this.

Thanks in Advance
Vivek
Reply With Quote
  #2 (permalink)  
Old 02-09-09, 09:36
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Please post your DB2 version, platform, and the complete error message. Message 22011 is a warning and not an error and I can't relate it to your problem at all.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #3 (permalink)  
Old 02-10-09, 07:47
tonkuma tonkuma is offline
Registered User
 
Join Date: Feb 2008
Location: Japan
Posts: 2,193
Is the error 22011 for the SET statement?
How did you confirm that?

I thought the possibility that another statement in your SQL procedure caused the 22011 error.

Last edited by tonkuma; 02-10-09 at 22:00.
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