Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Clobs and DBMS_LOB
stephen O'D wrote:
> I was recently looking over someone elses code and noticed that they
> were using CLOB's in PLSQL just like varchars, eg:
>
> declare
> v_clob clob;
> begin
> v_clob := v_clob||'some text';
> dbms_output.put_line (v_clob);
> end;
> /
>
> In the past I would have always coded this as:
>
> declare
> v_clob clob;
> begin
> dbms_lob.createTemporary( v_clob );
> dbms_lob.writeappend( v_clob, length('some text'), 'some_text');
> dbms_output.put_line ( dbms_lob.substr(v_clob,255,1) );
> dbms_lob.freeTemporary( v_clob );
> end;
> /
>
> Obviously my version is much more code. Is there any reason for me to
> continue to do this and what version of Oracle allowed you to start
> manipulating clobs so easily? Are there any performance considerations
> between the two methods?
>
> I am running 9.2.0.6 at the moment.
>
> Thanks,
>
> Stephen.
Relying on implicit conversion is always a bad idea.
-- Daniel A. Morgan http://www.psoug.org damorgan_at_x.washington.edu (replace x with u to respond)Received on Wed Mar 01 2006 - 15:03:20 CST