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: DA Morgan <damorgan_at_psoug.org>
Date: Wed, 30 Aug 2006 21:48:08 -0700
Message-ID: <1156999685.849957@bubbleator.drizzle.com>


tamsun wrote:

> On Thu, 31 Aug 2006 02:40:05 GMT, "IANAL_VISTA"
> <IANAL_Vista_at_hotmail.com> wrote:
> 

>> tamsun <tamsun_at_gmail.com> wrote in
>> news:f1gcf299gkpta5h69tikqr4h040vl1rb9t_at_4ax.com:
>>
>>> 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.
>>>
>> INSERT INTO T2 SELECT * FROM T1;
> 
> 
> I try this sql,but error occur:
> ORA-01465: invalid hex number

Read Brian's comment. You need LONG, not LONG RAW. But more importantly this data type has been deprecated and your move makes little sense. Why not a CLOB?

Also both of your column names are reserved words in Oracle. A very bad choice so consider changing your column names to avoid problems.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Wed Aug 30 2006 - 23:48:08 CDT

Original text of this message

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