Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Stored procedure parameters with one of them is a comma delimited string

ANNECJul 1 2022 — edited Jul 1 2022

I am using Oracle 19c.
I am trying to update some student stored grades using a PL/SQL stored procedure.
The stored procedure needs to parameter one is School year which is a number datatype, the other is schools, I hope it is a comma delimited string with schoolID in it , for example, 12, 18, 201, 206, 209.
Everytime we want to pass school year usually is current year, and a list of school ID, then the stored procedure goes to loop to update the stored grades for the students. Both schoolyearID and schoolID are numbers.
My question is how to write the two parameters one is a number, the other is a string of comma delimited numbers in the argument part of the stored procedure? And how the other pl/sql code to call the stored procedure?
Our senoria is we wrote a stored procedure and a wrapper to call the stored procedure, and let a person that knows little about coding to just run the code in sql developer to call the stored procedure and pass the string of a list of schoolids that she finished process.
Thanks

This post has been answered by Solomon Yakobson on Jul 1 2022
Jump to Answer
Comments
Post Details
Added on Jul 1 2022
9 comments
2,386 views