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

Home -> Community -> Usenet -> c.d.o.server -> Re: Reading CLOBs

Re: Reading CLOBs

From: Steve Howard <stevedhoward_at_gmail.com>
Date: 27 Oct 2006 08:03:13 -0700
Message-ID: <1161961393.381710.307330@i42g2000cwa.googlegroups.com>

artmt_at_hotmail.com wrote:
> Valentin Minzatu wrote:
> > >From a bird's eye view point, you could read, parse and write using
> > PL/SQL. You could optimize the processing using arrays if the table is
> > big for performance reasons as well.
> >
> > I am not very sure what makes the task different than anything else you
> > could do in PL/SQL.
> >
> > Am I missing the question?
>
> Suppose my data looks like this:
>
> 1111|Smith|John|H|19750101
> 1112|Jones|Anna||19690810
>
> My understanding is that with DBMS_LOB I can read chunks specified in
> bytes or in characters. How do I detect where the line ends and the new
> line begins?

SQL> set serveroutput on
SQL> declare
  2 l_clob clob;
  3 begin
  4 l_clob := '1111|Smith|John|H|19750101' || chr(13) || '1112|Jones|Anna||19690810';
  5 dbms_output.put_line(dbms_lob.instr(l_clob,chr(13)));   6 end;
  7 /
27

PL/SQL procedure successfully completed.

SQL> Received on Fri Oct 27 2006 - 10:03:13 CDT

Original text of this message

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