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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

PL/SQL - Splitting a delimited string and looping

605206Nov 2 2007 — edited Nov 3 2007
I am designing a stored procedure that has a parameter that is spec'd to come in as a comma delimited string, and I need to be able to loop through each delimited element and pass that element to another procedure.

i.e. -
PROCEDURE delete_link
(
pIn_Items_To_Delete IN VARCHAR2 --This is a parameter that contains a delimited list of items
)


So I need to call another procedure from within this procedure to handle the deletion of each item in the delimited list. I know how to call another procedure, but how can l loop through the items....?

I have read a little about using nested tables, but don't understand the entire concept.

Is there an easy way to do this in PL/SQL?

Let me know if anything above is unclear.

Any help would be appreciated.

Thanks!

Imp

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 1 2007
Added on Nov 2 2007
6 comments
13,899 views