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

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to transfer varchar2 to long raw

Re: How to transfer varchar2 to long raw

From: Brian Peasland <dba_at_nospam.peasland.net>
Date: Thu, 31 Aug 2006 03:12:25 GMT
Message-ID: <J4uE8u.CuD@igsrsparc2.er.usgs.gov>


tamsun wrote:
> hi, I have a question:
>
> I hava a table, such as:
>
> Table: T1
> Field:
> ID varchar(38),
> VALUE varchar(4000),
>
> Now I need modify table structure to:
> Table: T2
> Filed:
> ID varchar(38),
> VALUE long raw
>
> My question is:
> As filed "VALUE" had be changed to long raw,
> how to move old record into new table T2 by SQL,
> e.g. how to insert a string(such as "Hello World")
> into long raw filed by pure sql.

The LONG RAW datatype is used for BINARY data while the VARCHAR2 datatype is used for character data. These two are inconsistent with each other. You would want to use the LONG datatype instead.

That being said, it makes much more sense if you are creating the table anew to use the CLOB datatype as the LONG and LONG RAW datatypes may seee their end in the future.

HTH,
Brian

-- 
===================================================================

Brian Peasland
dba_at_nospam.peasland.net
http://www.peasland.net

Remove the "nospam." from the email address to email me.


"I can give it to you cheap, quick, and good.
Now pick two out of the three" - Unknown
Received on Wed Aug 30 2006 - 22:12:25 CDT

Original text of this message

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