DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: varchar to nvarchar data conversion

  1. #1
    Join Date
    Dec 2000
    Posts
    40
    Hi,

    We have a new table designed to store NVARCHAR type of data. That needs to be populated with some existing data from another table of VARCHAR2 type. Is there any function for data type conversion?

    Thanks in advance...

    M S Reddy

  2. #2
    Join Date
    Sep 2001
    Location
    NJ, USA
    Posts
    1,287
    Oracle will do automatic data type conversion between VARCHAR2 and NVARCHAR2
    See:
    http://download-east.oracle.com/otnd...nts2.htm#45443
    (table: Table 2-9 Explicit Type Conversion)

  3. #3
    Join Date
    Dec 2000
    Posts
    40
    I got it. See an example below

    > create table abc (a varchar2(20));

    Table created.

    > insert into abc values ('Varchar2');

    1 row created.

    > /

    1 row created.

    > create table bcd (a nvarchar2(20));

    Table created.

    > insert into bcd select translate(a using NCHAR_CS) from abc;

    2 rows created.


    Thanks
    MS Reddy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width