How to load UNICODE data into NCHAR/NVARCHAR2 columns?

    Somebody asked me this question after a try of AUL. They stored data in NCHAR/NVARCHAR2 data type, and then they use AUL to recover their dropped tables as text file. But hit some problem with loading the recovered rows into database, because some of the NCHAR/NVARCHAR2 type columns' data is recovered as UNICODE character set (AL16UTFE as national character set in Oracle 9i).

    Create a demo table with two columns (COL1 NVARCHAR2(100), COL2 NVARCHAR2(100)), and insert two rows, then use AUL to dump the rows to text file for test. By default the columns are seperated by "|", as following:

N C O L 1| N C O L 2
N C O L 1| N C O L 2

    I checked the Oracle document (Oracle Database Utilies Guide), and search on Google, no answer found. Also SQL*Loader have CHARACTERSET and BYTEORDER option, it did not do help in this case, because just few columns are UNICODE format, and I don't know how to write a SQL*Loader control file for the test table.

    Who has the same issue before? Can you give me an correct answer? Thanks very much!

Post a comment

SCode:
Mail(*, but will not be displayed):
Home: