Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> How Do I Parse a String into an Array or PL/SQL Table

How Do I Parse a String into an Array or PL/SQL Table

From: Dwight Crane <dwight.crane_at_mci.com>
Date: Wed, 11 Nov 1998 12:20:00 -0500
Message-ID: <1Ej22.29$nS.608@news.cwix.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US