Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pl sql: String into an array

Status
Not open for further replies.

yns

Programmer
Feb 15, 2006
6
GB
I have a string myString := "'YS','RB','AW'" which I want to put into an array

lNames := lVarray(myString);

How can I get the array to understand the values are separated by commas and not to treat this as one long string?
 
You will have to break up the string in a loop using the INSTR and SUBSTR parameters, then assign the resulting substrings to the array elements. If you do a search on this forum, there have been a number of examples of using string functions in this way.
 
Thanks. I was hoping there may be an easier way which I hadn't been able to find.

Will Do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top