Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2012
    Posts
    24

    Unanswered: How to pass multiple values to a single input parameter in stored procedure in DB2 Z/

    I have a requirement as below.

    I will get input parameter from Java with comma separated values to my SP as below.
    eg: 1234561314,45155621312,45124212325

    I have declared a I/P parameter I_KEY varchar(1000), which will hold the parameter value.

    But while using the same I/P parameter in select statement inside SP i am getting the below error.

    ERROR:
    Exception occurred while running:
    A database manager error occurred.SQLCODE: -420, SQLSTATE: 22018 - THE VALUE OF A STRING ARGUMENT WAS NOT ACCEPTABLE TO THE DECFLOAT FUNCTION. SQLCODE=-420, SQLSTATE=22018, DRIVER=4.12.55

    Anyone please help me whether can i pass array of list( 1234561314,45155621312,45124212325) directly to a I/P parameter in DB2 Z/OS 10.

    If array list is not possible any other possible solution to achieve this?

    Thanks In Advance.

  2. #2
    Join Date
    Dec 2007
    Location
    Richmond, VA
    Posts
    1,328
    Provided Answers: 5
    seems to me it is accepting it fine. The error msg states that you are trying to perform a function on a character sting. Perhaps problem is in the data?

  3. #3
    Join Date
    Feb 2008
    Location
    Japan
    Posts
    3,483
    Perhaps, you need to parse each elements of the string('1234561314,45155621312,45124212325')
    into a column of different rows(or columns in a row) of a temporary table(or a table-expression).

    But while using the same I/P parameter in select statement inside SP i am getting the below error.
    If you publish the select statement, more responses/suggestions might be possible.

Posting Permissions

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