08-26-04, 12:34 #1Registered User
- 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 :)
08-26-04, 13:28 #2Registered User
Provided Answers: 1
- Join Date
- Aug 2003
- Where the Surf Meets the Turf @Del Mar, CA
>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.
http://asktom.oracle.com 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.