Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> How Do I Parse a String into an Array or PL/SQL Table
I have a String (call it REG_RET) that is always a multiple of 12
Lets for example say it is 48 characters long... First I Find out
how many accounts are in the string by Dividing REG_RET by 12...
Now within each set of 12 there are 5 fields:
1-8 = account Number
9 = flag 1
10 = flag 2
11= flag 3
12= flag 4
thus Field 13 Starts the cycle back over with another Account Number and this goes on until there are no more accounts....
What I need is a way to establish each account with their flags such that a variable represents them
ACT_NUM1(1) = account number ACT_NUM1(2) = Flag 1 ACT_NUM1(3) = Flag 2 ACT_NUM1(4) = Flag 3 ACT_NUM1(5) = Flag 4
and then the next account would be
ACT_NUM2(1)= account number
.
.
ACT_NUM2(5) = Flag 4
I cannot find out to produce this... any help would be greatly appreciated!!
Dwight Received on Wed Nov 11 1998 - 11:20:00 CST