PL/SQL function to read a string of characters into an array
443806Jan 6 2006 — edited Jan 8 2006I 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