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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: PL/SQL Question - Separating A Delimited String Into temporary Variables

Re: PL/SQL Question - Separating A Delimited String Into temporary Variables

From: Connor McDonald <hamcdc_at_yahoo.co.uk>
Date: Thu, 3 Feb 2005 05:34:42 +0000 (GMT)
Message-ID: <20050203053442.29575.qmail@web86909.mail.ukl.yahoo.com>


while instr(v,'-') > 0 loop
  x(x.count+1) := substr(v,1,instr(v,'-')-1);   v := substr(v,instr(v,'-')+1);
end loop

or something thereabouts

> Hello:
>
> I am converting my Perl program into an Oracle package but I have run
> into a small problem. I have been successfully except for a minor
> problem. I would like to separate a value of 1-2-3-4-5-6-7 by the dash,
> into seven separate values. The finish product would turn out to be
> something like val1 = 1, val2 = 2, val3 = 4, etc. Is this possible? If
> so, how can I achieve this? Thanks!
>
> Kevin
> --
> http://www.freelists.org/webpage/oracle-l
>



Connor McDonald
Co-author: "Mastering Oracle PL/SQL - Practical Solutions" ISBN: 1590592174 web: http://www.oracledba.co.uk
web: http://www.oaktable.net
email: connor_mcdonald_at_yahoo.com

Coming Soon! "Oracle Insight - Tales of the OakTable"

"GIVE a man a fish and he will eat for a day. But TEACH him how to fish, and...he will sit in a boat and drink beer all day"


                

Do you Yahoo!?
The all-new My Yahoo! - What will yours do? http://my.yahoo.com
--
http://www.freelists.org/webpage/oracle-l
Received on Thu Feb 03 2005 - 00:37:19 CST

Original text of this message

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