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: inserting a string into a lob

Re: inserting a string into a lob

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Mon, 20 Oct 2003 10:37:42 -0700
Message-ID: <1066585073.540977@yasure>


Obistro wrote:

> Hi,
>
> I'm using Oracle 8.1.7 DB.
> I want to insert a string (varchar2) into a lob (a long raw in fact).
> The string is UTF8 encoded, and I want to know how to convert it from
> varchar2 to long raw, without loosing special characters.
> I want to do it internally, ie using a store procedure.
>
> I've found a conversion from char to raw but this only works with
> ascii char.
>
> Could anybody help me ?
>
> Thanks
>

Given that Oracle has been advising, for some time now, that developers stop using LONG RAW, which is not
a LOB at all, I'd suggest two things.

  1. That you redefine the column so as to reflect best practices.
  2. That you consider the fact that a VARCHAR2 is a string. That the appropriate place for a string is a CLOB, not a BLOB, and that therefore even if you choose to ignore the advice it belongs in a LONG, not a LONG RAW.

PS: And please do not crosspost to multiple groups.

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Mon Oct 20 2003 - 12:37:42 CDT

Original text of this message

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