Re: How to transfer varchar2 to long raw



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@xxxxxxxxxxxxxxxxxxx
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
.



Relevant Pages

  • Re: How to transfer varchar2 to long raw
    ... Now I need modify table structure to: ... As filed "VALUE" had be changed to long raw, ... how to move old record into new table T2 by SQL, ... The LONG RAW datatype is used for BINARY data while the VARCHAR2 ...
    (comp.databases.oracle.misc)
  • Re: BLOB Storage Issue
    ... I am not sure of the conversion but if you had the value in raw wouldn't ... the binary data. ... This requirement is due to the fact that the customer is using an old ... I tried using BLOB but the max value for 4-bytes is 128,100,000. ...
    (comp.databases.oracle.server)
  • Re: Help - JNI and JMS - data conversion problems
    ... The reason for embedding the binary data in text data was purely to test ... there are occasions where it must place "raw" data on the Queues. ... and/or char[] data. ... > Note when you do this your Strings will be counted UTF-8 format. ...
    (comp.lang.java.programmer)
  • Re: Printing graphics & text
    ... setting the printer to "raw" to move the binary data to it. ... Yet they all work with the pcx2pcl download program. ... like the binary data is not being download to the printer correctly. ... The LanMan Library for Clipper ...
    (comp.lang.clipper)
  • Re: Comparing jpgs via reponseStreams?
    ... You can't trust how browsers handle raw ... binary data in javascript variables. ...
    (comp.lang.javascript)