5 Replies Latest reply: Jan 10, 2013 11:28 AM by Srini Chavali-Oracle RSS

    File Load

    903224
      Hi ,

      below is what is there in my file File.csv for a column

      "호텔 주변 교"

      I need to load this into a table, but when i loaded the data using external table
      CREATE TABLE T_EXT
      (C1  VARCHAR2(300 CHAR))
      ORGANIZATION EXTERNAL
      (
          TYPE oracle_loader
          DEFAULT DIRECTORY DIR                  
          ACCESS PARAMETERS (RECORDS DELIMITED BY NEWLINE
          SKIP 1
          FIELDS TERMINATED BY '|'
          OPTIONALLY ENCLOSED BY '"'
          MISSING FIELD VALUES ARE NULL
          )
      LOCATION ('File.csv'))
      reject limit unlimited
      {code}
      
      when i see the data in the table "¿¿ ¿¿ ¿¿¿ ¿¿¿"(inside quotes)
      
      is it possible to see the same data("호텔 주변 교") in the table , what are changes i need to do to my script ? pls help.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
        • 1. Re: File Load
          Srini Chavali-Oracle
          Pl post details of OS and database versions. What is the database characterset ? Is it capable of storing this language (Chinese ?) ?

          http://docs.oracle.com/cd/E11882_01/server.112/e10729/ch2charset.htm

          If the database characterset is capable of storing this language, then pl also identify the characterset of the input file using the CHARACTERSET clause

          http://docs.oracle.com/cd/E11882_01/server.112/e22490/et_params.htm#i1009499

          HTH
          Srini
          • 2. Re: File Load
            903224
            thanks for your reply...

            server :
            echo $NLS_LANG
            AMERICAN_AMERICA.WE8ISO8859P1

            File.csv : text/plain; charset=iso-8859-1

            pls find below nls parameters

            PARAMETER     VALUE

            NLS_LANGUAGE     AMERICAN
            NLS_DATE_LANGUAGE     AMERICAN
            NLS_CHARACTERSET     AL32UTF8
            NLS_NCHAR_CHARACTERSET     AL16UTF16
            • 3. Re: File Load
              Srini Chavali-Oracle
              AL32UTF8 is capable of storing this language - pl use the CHARACTERSET parameter as explained above.

              How was this csv file created ? "charset=iso-8859-1" is not capable of representing these characters.

              HTH
              Srini
              • 4. Re: File Load
                903224
                I used UTF8 in my script to load but not displaying the proper data.I am using toad to display.when i did ASCIISTR for this column also i see ?????(Toad).

                i see the data in the file in global language but not able to see in the DB after loading ...what could be chnage that i need to do in the script of on session level?

                this is what i see on SQLPLUS

                SQL> select ASCIISTR(C1) from T_EXT ;

                ASCIISTR(LONG_LABEL)
                --------------------------------------------------------------------------------
                \D638\D154 \C8FC\BCC0 \AD50\D1B5
                • 5. Re: File Load
                  Srini Chavali-Oracle
                  Some versions of TOAD are not capable of displaying multibyte characters. Can you use the latest version of SQL Developer to verify what is loaded ? Your script above does not show the CHARACTERSET option.

                  HTH
                  Srini