Thursday, December 24, 2009

How to import data that was exported in different Characterset.


This is possible to define a parameter that will force VARCHAR to work like Characters instead of Bytes in order to get the possibility of working in Unicode. The major problem is that above action does not impact on IMPORT therefore the table might be built before Import.
ALEX> create table a (a varchar2(10));
Table created.ALE> desc a
Name                            Null     Type
------------------------------- -------- ----
A                                        VARCHAR2(10)
ALE> alter session set nls_length_semantics = char;
Session altered.
ALE> create table b (a varchar2(10));
Table created.
ALE> desc b
Name                             Null    Type
------------------------------- -------- ----
A                                        VARCHAR2(30)
In addition, this is possible to define manually working on Character:
ALE> create table c (a varchar2(10 char));
Table created.
ALE> desc c
Name                            Null    Type
------------------------------- -------- ----
A                                        VARCHAR2(30)

No comments: