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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Retrieve data from a varchar2(4000) based on a delimiter.

Re: Retrieve data from a varchar2(4000) based on a delimiter.

From: Dermot Mackey <dmackey_at_iel.ie>
Date: Wed, 01 Aug 2001 16:11:01 +0100
Message-ID: <3B681C05.B69340C1@iel.ie>

Thanks Markus.

Markus Stuhlpfarrer wrote:

> search for the delimiter with instr and seperate them with substr
> instr(INSTRING,DELIMITER,OFFSET,NthOccurance)
> so, if you search for the delimiter "," in the string "12,13,12"
> the statement would be something like that:
> instr('12,13,12',',')
> if you want the second one:
> instr('12,13,12',',',1,2)
> this statement returns you the position of the searched delimiter (or
> whatever you want)
>
> and you can seperate it with substr
> substr(INSTRING,OFFSET,LENGTH)
>
> Dermot Mackey wrote:
>
> > Hi guys,
> >
> > I have a string of 4000 characters which contains data from 20 fields
> > seperated by a delimiter. Is there any method in PLSQL that will allow
> > me to search this string for the delimiter and therefore allowing me to
> > seperate and extract the data in the string into individual variables ?
> >
> > Many Thanks,
> > Dermot
  Received on Wed Aug 01 2001 - 10:11:01 CDT

Original text of this message

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