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!

PL/SQL function to read a string of characters into an array

443806Jan 6 2006 — edited Jan 8 2006
I was wondering if there is an easier way than using the substr function multiple times. Here is the example:
Suppose you have a varchar2 variable that contains the word 'Apple'. The function should take it and produce an array. We would invoke it like this:

<what data structure?> a := stringunpackerfunction(x);
// x is the varchar2 containing 'Apple'.

The resulting a would be such that a[0] is 'A', a[1] is 'p', a[2] is 'p', a[3] is 'l' and a[4] is 'e'.

If there is no direct function to do this in a single invocation, is there a function to simply read a string of characters and return 'the next character'?

Thanks,

Regards,

Srini
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 5 2006
Added on Jan 6 2006
2 comments
14,262 views