Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2009

    Question Unanswered: 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

  2. #2
    Join Date
    Jan 2007
    Jena, Germany
    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

  3. #3
    Join Date
    Feb 2008
    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 23:00.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts