Re: How to transfer varchar2 to long raw



On Thu, 31 Aug 2006 03:12:25 GMT, Brian Peasland
<dba@xxxxxxxxxxxxxxxxxxx> wrote:

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


field F1 is varchar2(4000), I want move the data in F1 into
another filed F1 which is long raw.
I wonder how to do by sql?
.



Relevant Pages

  • Re: How to transfer varchar2 to long raw
    ... As filed "VALUE" had be changed to long raw, ... e.g. how to insert a stringinto long raw filed by pure sql. ... The LONG RAW datatype is used for BINARY data while the VARCHAR2 datatype is used for character data. ...
    (comp.databases.oracle.misc)
  • Re: Bitwise OR just like SUM or COUNT
    ... SQL is a high level language; ... SQL Server's BIT datatype ...
    (microsoft.public.sqlserver.programming)
  • Re: SQL Injection - SQL query comments
    ... SELECT statements joined by UNION must have the same number of columns with compatible datatypes in each statement. ... You'll have to cast USERNAME as a sql_variant datatype - it wouldn't hurt to cast the filler columns as well just so you don't have to figure out the ... SQL Injection - SQL query comments ... Cross site scripting and other web attacks before hackers do! ...
    (Pen-Test)
  • Re: Convert bit feld to Yes/No
    ... SQL Server defined the bit datatype, ... a high-level language I really don't know or care how it is stored. ... I do know that the True value of a Boolean datatype can take several forms. ... > SQL is a high level language; it is abstract and defined without regard ...
    (microsoft.public.sqlserver.programming)
  • Re: SQL Data Types (7 vs 2k)
    ... What it sounds like is they have a WHERE clause that is ... comparing two different datatypes and the proper indexes are being used. ... Andrew J. Kelly SQL MVP ... > datatype precedence in WHERE clauses in SQL2K vs. ...
    (microsoft.public.sqlserver.programming)