Home » SQL & PL/SQL » SQL & PL/SQL » Replace string to array - pl/sql (string to array, pl/sql)
Replace string to array - pl/sql [message #294122] Wed, 16 January 2008 09:36 Go to next message
sammeras
Messages: 28
Registered: September 2007
Location: Israel
Junior Member

Hi guys,
I have question for experts.
How can i replace a string to array and loop for the count value?

Thats mean, i create procedure called: print_arr_value

Example:

Create Or Replace print_arr_value(v_names)
AS
v_names_arr ARRAY := ....TO_ARRAY(v_names)....;
--ARRAY, TO_ARRAY - I just fabricate those function Smile
BEGIN
FOR i in 1..COUNT(v_names_arr) LOOP
--COUNT(ARRAY) - I just fabricate Count function Smile
DBMS_OUTPUT.PUT_LINE(v_names_arr(i));
END LOOP;
END;

EXEC print_arr_value('Sam,Dan,Ram,Palm,Hal,Stam');

Anybody can give me a close solution? Or one similar to this issue ?


Thanks guys.

Re: Replace string to array - pl/sql [message #294130 is a reply to message #294122] Wed, 16 January 2008 09:55 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
You better give us an example or a description in words of what you want instead of some made-up code.
I for one have no idea what it is you are looking for.
Re: Replace string to array - pl/sql [message #294135 is a reply to message #294122] Wed, 16 January 2008 10:22 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You have to first read the basics of PL/SQL: PL/SQL User's Guide and Reference

Regards
Michel
Previous Topic: Query Help!
Next Topic: insert sequence with value from other table
Goto Forum:
  


Current Time: Sat Dec 03 18:07:55 CST 2016

Total time taken to generate the page: 0.11579 seconds