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!

Help with a string operation...

NapsterNov 4 2008 — edited Nov 5 2008
Hi Guys,

I need a small help with tokenizing semicolon ‘;’ separated string.

I have to do the following,

aa_ := '11;12;13';
bb_ := '21;22;23';
cc_ := '31;32;33';

LOOP (Till all three values are processed in the aa_, bb_ and cc_)

--Get the fist value of aa_, bb_, cc_ and use it. Like…
Array(1) := 11*21*31;

END LOOP;

---------------------

I used something like this… any better idea?

FOR count_ IN 0..(length(attr_order_no_) - length(replace(attr_order_no_,';'))) LOOP

Value1_aa_ := substr(aa_, 0, (instr(aa_, ';')-1));
aa_ := substr(aa_, (instr(aa_, ';')+1), length(aa_));

etc…

Array(1) := Value1_aa_* Value1_bb_* Value1_cc_;

END LOOP;

Thanks you…
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 3 2008
Added on Nov 4 2008
8 comments
409 views