Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: inserting comma-separated values with pl/sql
Christoph Seidel wrote:
> Hi there,
>
> i have a stored proc which has a varchar parameter which contains a list of
> values, separated by comma.
>
> e.g.: 123,456,789
>
> what i wanna do is to separate the values and insert them into a table
>
> e.g.
>
> insert into t (f) values (123);
> insert into t (f) values (456);
> insert into t (f) values (789);
>
> Can this be done with pl/sql? And if i can be done, how?
Kenneth and Karsten's responses are good general methods. If your comma delimited values are no more than 30 characters, DBMS_UTILITY.COMMA_TO_TABLE is far more efficient.
Daniel Morgan Received on Fri Feb 21 2003 - 15:40:01 CST
![]() |
![]() |