Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2004

    Unanswered: passing in array of integer values

    I am very new to oracle and I am trying to write a stored procedure where I can pass in an array of integers in order to retrieve a result set


    create or replace procedure sp_cases array varchar (?)
    select * from cases
    where id in (:array)

    array would contain the values

    I would like to pass the parameter in as a comma delimited value (500, 600, 700).

    can someone tell me how to do this?

    Last edited by awfdml; 08-26-04 at 12:38. Reason: correction :)

  2. #2
    Join Date
    Aug 2003
    Where the Surf Meets the Turf @Del Mar, CA
    Provided Answers: 1
    >can someone tell me how to do this?
    It appears you are aware a some technical terms, but don't really "grok" them.
    The variable does not need to be an "array". It can simply be a VARCHAR2.
    Regardless of the variable type, it can NOT be used as you wanted to do.
    You'll need to use EXECUTE IMMEDIATE. has lots of good code examples.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

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