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 to parse a string to Create an Array

How to parse a string to Create an Array

From: Dwight Crane <dwight.crane_at_mci.com>
Date: Tue, 10 Nov 1998 11:56:59 -0500
Message-ID: <Rg_12.1433$b47.3214@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 Tue Nov 10 1998 - 10:56:59 CST

Original text of this message

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