View Single Post

   
  #6 (permalink)  
Old 04-08-2008, 11:15 AM
DA Morgan
 
Posts: n/a
Default Re: How to transfer varchar2 to long raw

tamsun wrote:
> On Thu, 31 Aug 2006 02:40:05 GMT, "IANAL_VISTA"
> <IANAL_Vista@hotmail.com> wrote:
>
>> tamsun <tamsun@gmail.com> wrote in
>> news:f1gcf299gkpta5h69tikqr4h040vl1rb9t@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@x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Reply With Quote