SQL Loader UTF8 Charset  issue

Hi,
My database charset is UTF8, NLS_LANG parameter on mid tier (unix) is UTF8. I have created a spool file (Korean language) in UTF8 charset. Also, verified the dat file using a unicode text editor. When I am trying to upload data back to the database using SQL loader data is not getting uploaded properly. It uploads after doing some internal encoding/decoding. I have tried with characterset parament in ctrl file as UTF8.
Could anyone pls help me identifying the issue and respective resolution?
Thanks in advance.
Sanyog

Also useful for you (NLS_LANG and sqlloader) may be this thread:
sqllder especial carector issue

Similar Messages

  • SQL Loader and whitespace issues

    Hello users,
    I've got an issue that I know is breaking based on a comments field, which allows nearly every type of character in it.
    Long story short, I'm trying to upload an Access table, turned to .csv file into Oracle via SQL Loader.
    I'm able to do it if I delete or set the COMMENTS column to null before doing so.
    If I try the option with the contents of this field populated, it blows up. I've got it terminated by a tilde in the control file, which the COMMENTS field does not contain at all, even with some 5.000+ records.
    However, people upon entering comments have put many carriage returns in there. I noticed once I export the data to text or csv, then open in Excel, it shows the column breaking and spilling over into fields it shouldn't, thereby causing the big problem.
    I've been searching but haven't found a way I can wrap these whitespaces or have SQL Loader ignore them.
    I can't use TERMINATED BY WHITESPACE in the SQL Loader control file because that will cause the field to break without all the comments and I can't use optionally enclosed by " because these people have also used " in the COMMENTS field.
    Do I have any option here, other than to brute force make an update query of some kind to manually populate the data? I can do that if I have to but i'd sure rather have all the data dump in via SQL Loader if I can.
    Thanks!

    Actually, it wasn't related to the size of the column. I made it like 3000, to hold 3000 characters, which was plenty.
    But I used
    PRESERVE BLANKS and then it worked fine!

  • Sql*loader field length issue

    so I'm loading a file and it's rejected a record where "field in data file exceeds maximum length" the record it's failing on has data length of 625 characters. I'm loading it into a table with a field type of varchar2(1024).
    for the life of me, I can't figure out why it's failing. I've even gone and manually copy and pasted the rogue record into the table (via Toad) and it works fine, but I need it to load via SQL*loader.
    there is no white space that i'm not counting. Can anyone suggest where to look next?

    Hi,
    Just change the problematic field in the control file as
    load
    field char(1000),
    If you give the length in the control file, ur problem ll be solved.
    - karthik

  • SQL LOADER DATA INSERT ISSUES

    I tried inserting data into an empty table in my database but got the following error:
    SQL*Loader: Release 11.1.0.6.0 - Production on Tue Jul 7 22:01:35 2009
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    SQL*Loader-350: Syntax error at line 7.
    Expecting "," or ")", found "VARCHAR2".
    countryname VARCHAR2(25),
    ^
    What is wrong what this please? Find below the contents of .CTL and .DAT files.
    Content of load_country.CTL
    LOAD DATA
    infile '/D:/Data/Load/load_country.dat'
    INTO TABLE ASSET.COUNTRY
    INSERT
    FIELDS TERMINATED BY ';'
    (countrycode,
    countryname VARCHAR2(25),
    population NUMBER(10))
    The content of the load_country.DAT file:
    BEN;Benin;8791832
    BFA;Burkina Faso;15746232
    CPV;Cape Verde;503000
    Thank you.
    Ofonime Essien.

    Hello,
    After solving the Varchar2 problem, I received this error for the NUMBER data type:
    SQL*Loader: Release 11.1.0.6.0 - Production on Wed Jul 8 11:47:16 2009
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    SQL*Loader-350: Syntax error at line 8.
    Expecting "," or ")", found "number".
    population number(10))
    ^
    I replaced the Number data type with Float but received this error:
    SQL*Loader: Release 11.1.0.6.0 - Production on Wed Jul 8 11:52:27 2009
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    SQL*Loader-350: Syntax error at line 8.
    Expecting valid column specification, "," or ")", found "(".
    population Float(10))
    ^
    Replacing Number data type with Integer, I received this error:
    SQL*Loader: Release 11.1.0.6.0 - Production on Wed Jul 8 12:17:11 2009
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    Control File: D:\Data\Load\tsl.CTL
    Data File: D:\Data\Load\c.dat
    Bad File: D:\Data\Load\c.bad
    Discard File: none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array: 64 rows, maximum of 256000 bytes
    Continuation: none specified
    Path used: Conventional
    Table C, loaded from every logical record.
    Insert option in effect for this table: INSERT
    Column Name Position Len Term Encl Datatype
    COUNTRYCODE FIRST * ; CHARACTER
    COUNTRYNAME NEXT 27 VARCHAR
    POPULATION NEXT 10 INTEGER
    SQL*Loader-941: Error during describe of table C
    ORA-04043: object C does not exist
    Thank you so much.
    Ofonime.
    Edited by: ofonime on Jul 8, 2009 7:09 PM

  • SQL Loader Direct Path issue

    Hi,
    I am trying to load data using SQL Loader Direct Path. One of the tables has a REC_UPD_DT column which is of timestamp datatype. The table was created with default value of SYSTIMESTAMP on this column. However when I load the table, the REC_UPD_DT is null due to the behavior(bypasses the sqlfunctions, etc) of the Direct Path method.
    What is the way out to achieve my objective?
    I do not want to use the conventional path since that is proven to be slow for my case.
    Thanks in advance
    Pavin

    Hi,
    My apologies for not providing requested information before. Here are the scripts:
    I am testing from my windows m/c.
    Database version: 10.2.0.3
    Table creation script:
    CREATE TABLE TXN_DEFAULT
    (MAPPER_Q_ID NUMBER(1,0) NOT NULL,
    TRANSACTION_SEQUENCE NUMBER(10,0) NOT NULL,
    RECORD_COUNT NUMBER(4,0),
    STATUS VARCHAR2(1 CHAR),
    USER_ID VARCHAR2(20 CHAR),
    USER_IP_ADDRESS VARCHAR2(35 CHAR),
    REC_UPD_DT TIMESTAMP (6) DEFAULT SYSTIMESTAMP
    Loader Control file script:
    OPTIONS (DIRECT=TRUE)
    load data
    CHARACTERSET WE8ROMAN8
    into table TXN_DEFAULT
    append
    FIELDS TERMINATED BY '     '
    trailing nullcols
    MAPPER_Q_ID,
    TRANSACTION_SEQUENCE,
    RECORD_COUNT,
    STATUS,
    USER_ID,
    USER_IP_ADDRESS,
    REC_UPD_DT     
    Sample Dat file contents:
    0     251939112     3     N     chowdsr     10.222.79.20     
    1     251939113     140     N     zhuanre     146.222.52.176     
    2     251939114     41     N     sombupo     146.222.187.155     
    0     251939116     75     N     BaseAdmin     146.222.4.246     
    Log File contents:
    SQL*Loader: Release 10.2.0.1.0 - Production on Mon Dec 7 13:22:23 2009
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Control File: Control.ctl
    Character Set WE8ROMAN8 specified for all input.
    Data File: Control.dat
    Bad File: Control.bad
    Discard File: none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Continuation: none specified
    Path used: Direct
    Table TXN_DEFAULT, loaded from every logical record.
    Insert option in effect for this table: APPEND
    TRAILING NULLCOLS option in effect
    Column Name Position Len Term Encl Datatype
    MAPPER_Q_ID FIRST * WHT CHARACTER
    TRANSACTION_SEQUENCE NEXT * WHT CHARACTER
    RECORD_COUNT NEXT * WHT CHARACTER
    STATUS NEXT * WHT CHARACTER
    USER_ID NEXT * WHT CHARACTER
    USER_IP_ADDRESS NEXT * WHT CHARACTER
    REC_UPD_DT NEXT * WHT CHARACTER
    Table TXN_DEFAULT:
    4 Rows successfully loaded.
    0 Rows not loaded due to data errors.
    0 Rows not loaded because all WHEN clauses were failed.
    0 Rows not loaded because all fields were null.
    Bind array size not used in direct path.
    Column array rows : 5000
    Stream buffer bytes: 256000
    Read buffer bytes: 1048576
    Total logical records skipped: 0
    Total logical records read: 4
    Total logical records rejected: 0
    Total logical records discarded: 0
    Total stream buffers loaded by SQL*Loader main thread: 1
    Total stream buffers loaded by SQL*Loader load thread: 0
    Run began on Mon Dec 07 13:22:23 2009
    Run ended on Mon Dec 07 13:22:23 2009
    Elapsed time was: 00:00:00.75
    CPU time was: 00:00:00.08
    If I run using Conventional path, the REC_UPD_DT is populated with the a systimestamp value. However, this column values are null when I use the Direct path. Log files have no errors. What is the way out to achieve my objective?
    Thanks in advance.
    - Pavin

  • Help sql loader causing serious issues..

    the data to be loaded is in this format
    3IINFOTECH,EQ,32.95,35.2,32.6,34.6,34.15,32.5,1479525,50813978.1,1-APR-2009
    3MINDIA,EQ,875,875,867.1,870.45,870.05,896.9,85,73964,1-APR-2009
    AARTIDRUGS,EQ,36.45,38.5,36.45,38.5,38.5,37.4,66,2535.2,1-APR-2009
    AARTIIND,EQ,27.55,29.4,27.55,29.25,29.3,28.35,4385,126377.1,1-APR-2009
    AARVEEDEN,EQ,14.6,14.7,13.75,14.55,14.55,14.05,1460,20954,1-APR-2009
    ABAN,EQ,394.6,418,387,395.65,396,398.35,5684513,2283652625.85,1-APR-2009
    ABB,EQ,426.15,433,414,425.8,426.95,426.7,574908,242421746.95,1-APR-2009
    ABCIL,EQ,36,38.4,35.1,37.55,36.7,35.5,2557,93327,1-APR-2009
    ABGSHIP,EQ,83.7,85.8,80.15,84.3,84.05,82.85,631506,53020030.95,1-APR-2009
    the error comes only at the date part... here is the copy of control file and badfile
    load data
    infile 'temp.txt'
    into table shares
    fields terminated by ','
    (sname,symbol,open,high,low,close,last,totrdqty,totrdval,day "to_date('dd-MON-yyyy')")
    Record 1: Rejected - Error on table SHARES, column DAY.
    ORA-01858: a non-numeric character was found where a numeric was expected

    Your controlfile indicates that the data should have 10 fields whereas the actual data file contains 11 fields.
    Please cross check your controlfile.
    Edited by: Satish Kandi on Jun 10, 2009 2:51 PM

  • Urgent :SQL Loader Arabic Character Set Issue

    HI all,
    I am loading arabic characters into my database using SQL Loader using a fixed length data file. I had set my characterset and NLS_LANG set to UTF8.When I try to load the chararacter 'B' in arabic data i.e. ' لا ' , it gets loaded as junk in the table. All other characters are loaded correctly. Please help me in this issue and its very urgent.
    Thanks,
    Karthik

    Hi,
    Thanks for the responses.
    Even after setting the characterset to arabic and the problem continues to persist. This problem occurs only with the character "b".
    Please find my sample control file,input file and nls_parameters below:
    My control file
    LOAD DATA
    characterset UTF8
    LENGTH SEMANTICS CHAR
    BYTEORDER little endian
    INFILE 'C:\sample tape files\ARAB.txt'
    replace INTO TABLE user1
    TRAILING NULLCOLS
    name POSITION(1:2) CHAR(1),
    id POSITION (3:3) CHAR(1) ,
    salary POSITION (4:5) CHAR(2)
    My Input file - Fixed Format
    ?a01
    ??b02
    ?c03
    The ? indicates arabic characters.Arabic fonts must be installed to view them.
    NLS_PARAMETERS
    PARAMETER     VALUE
    NLS_LANGUAGE     ARABIC
    NLS_TERRITORY     UNITED ARAB EMIRATES
    NLS_CURRENCY     ?.?.
    NLS_ISO_CURRENCY     UNITED ARAB EMIRATES
    NLS_NUMERIC_CHARACTERS     .,
    NLS_CALENDAR     GREGORIAN
    NLS_DATE_FORMAT     DD/MM/RR
    NLS_DATE_LANGUAGE     ARABIC
    NLS_SORT     ARABIC
    NLS_TIME_FORMAT     HH12:MI:SSXFF PM
    NLS_TIMESTAMP_FORMAT     DD/MM/RR HH12:MI:SSXFF PM
    NLS_TIME_TZ_FORMAT     HH12:MI:SSXFF PM TZR
    NLS_TIMESTAMP_TZ_FORMAT     DD/MM/RR HH12:MI:SSXFF PM TZR
    NLS_DUAL_CURRENCY     ?.?.
    NLS_COMP     BINARY
    NLS_LENGTH_SEMANTICS     CHAR
    NLS_NCHAR_CONV_EXCP     FALSE

  • Loading "fixed length" text files in UTF8 with SQL*Loader

    Hi!
    We have a lot of files, we load with SQL*Loader into our database. All Datafiles have fixed length columns, so we use POSITION(pos1, pos2) in the ctl-file. Till now the files were in WE8ISO8859P1 and everything was fine.
    Now the source-system generating the files changes to unicode and the files are in UTF8!
    The SQL-Loader docu says "The start and end arguments to the POSITION parameter are interpreted in bytes, even if character-length semantics are in use in a datafile....."
    As I see this now, there is no way to say "column A starts at "CHARACTER Position pos1" and ends at "Character Position pos2".
    I tested with
    load data
    CHARACTERSET AL32UTF8
    LENGTH SEMANTICS CHARACTER
    replace ...
    in the .ctl file, but when the first character with more than one byte encoding (for example ü ) is in the file, all positions of that record are mixed up.
    Is there a way to load these files in UTF8 without changing the file-definition to a column-seperator?
    Thanks for any hints - charly

    I have not tested this but you should be able to achieve what you want by using LENGTH SEMANTICS CHARACTER and by specifying field lengths (e.g. CHAR(5)) instead of only their positions. You could still use the POSITION(*+n) syntax to skip any separator columns that contain only spaces or tabs.
    If the above does not work, an alternative would be to convert all UTF8 files to UTF16 before loading so that they become fixed-width.
    -- Sergiusz

  • How to load XML file to table (non-XML) with SQL*Loader -- issue with nulls

    I have been attempting to use SQL*Loader to load an XML file into a "regular" Oracle table. All fields work fine, unless a null is encountered. The way that nulls are represented is shown below:
    <PAYLOAD>
    <FIELD1>ABCDEF</FIELD1>
    <FIELD2/>
    <FIELD3>123456</FIELD3>
    </PAYLOAD>
    In the above example, FIELD2 is a null field and that is the way it is presented. I have searched everywhere and have not found how I could code for this. The issue is that if FIELD2 is present, it is coded like: <FIELD2>SOMEDATA</FIELD2>, but the null is represented as <FIELD2/>. Here is a sample of the control file I am using to attempt the load -- very simplistic, but works fine when fields are present:
    load data
    infile 'testdata.xml' "str '<PAYLOAD>'"
    TRUNCATE
    into table DATA_FROM_XML
    FIELD1 ENCLOSED BY '<FIELD1>' AND '</FIELD1>',
    FIELD2 ENCLOSED BY '<FIELD2>' AND '</FIELD2>',
    FIELD3 ENCLOSED BY '<FIELD3>' AND '</FIELD3>')
    What do I need to do to account for the way that nulls are presented? I have tried everything I could glean from the web and the documentation and nothing has worked. Any help would be really appreciated.

    I hadn't even got that far. can you direct me to where the docs are to import data that is stored within xml but that you don't need any xml functionality, that just happens to be the format the data is stored in? thx

  • Sql loader syntax issue

    SQL*Loader: Release 11.1.0.7.0 - Production on Thu Mar 18 07:21:37 2010
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    SQL*Loader-350: Syntax error at line 1.
    Expecting keyword LOAD, found "ÐÏ".
    ÐÏࡱá
    ^
    My sqlldr file looks like this:
    sqlldr control=C:\data\ctl\ss.ctl log=C:\data\logs\ss.log userid=User/Password errors=999 discard=C:\data\discard\ss.dis
    control file looks like this:
    LOAD DATA
    INFILE 'C:\data\SS.TXT' "STR '\r\n'"
    REPLACE
    INTO TABLE SS
    FIELDS TERMINATED BY ';'
    TRAILING NULLCOLS
    ACCOUNT_NBR CHAR,
    ADDR1 CHAR,
    ADDR2 CHAR,
    ADDR3 CHAR,
    ADDR4 CHAR,
    CITY CHAR,
    STATE CHAR,
    ZIPCODE CHAR ,
    more columns all of the are the same syntax column name and char
    I can load this table using the enterprise manager but when using the sqlldr its not working.
    Anything stand out?
    Edited by: mlojan on Mar 18, 2010 5:33 AM

    Only thing I can think of is there is some character set issue between the control file and the operating syste/oracle server.
    You did you create the control file using a text based editor such as notepad or wordpad didn't you? You haven't used something like MS Word?

  • SQL*Loader issue with WHEN command

    Environment: R12.1.2
    We have a file coming in from a bank that needs to be loaded into a custom table using SQL*Loader.
    The file has multiple record formats. Each record in the file starts with a "record type", which defines the format.
    For simplicity, let me say that there is a record type of "H" with the header format, and another record type "D" has a detail record format. An "H" record may be followed by multiple "D" records until the next "H" record is encountered. Unfortunately, there is no common key, like say "Vendor Number" in both the "H" and "D" records to establish a relationship. So the plan was to use a Oracle sequence or SQL*Loader sequence to get a sequence loaded into the table as the file is being loaded. Then if consecutive "H" records had a sequence value of 100 and 112, we would know that the "D" records for the "H" 100 record are all the records with sequence value of 101 through 111.
    The issue occurs as we have to use the WHEN command in the control file to direct a certain record type to specific columns of the table. Based on the populated sequence values, with the WHEN command, it seems that all the "H" records get loaded first followed by the "D" records. The sequence becomes of no use and we cannot establish a link between the "H" and "D" records. The alternative is to not use WHEN with the sequence, but load the file into generic column names which provides for less understanding in the application.
    Is there a way (command feature) to ensure that SQL*Loader loads the records sequentially while using WHEN?
    Thanks
    Satish

    I used RECNUM parameter instead of sequence and it worked fine

  • Sql loader issue ; please reply

    Hi All
    I added 2 extra columns to an existing table .
    table tab (ATTD_IND,
    ATTD_ID,
    SEQ_NO,
    CREATE_DATE "to_char(sysdate,'yyyymmdd')",
    CYCLE_DT_CD "to_char(sysdate,'yyyymmdd')",
    CMEH_ID,
    ATTENDEE_TYPE,
    This table is populated using loader. The issue is the file which we get is having data till seq_no .So the ctl. file works as create date and cycle dt are the last columns values defaulted to sysdate. We dont get them in the file. Now the file would have 2 new columns after seq_no , which are cmeh id and attendee type.
    the issue is how to load these using the ctl file. I cant change the table and make create date and cycle date as the last columns. FILLER does not work here as I am not skipping any columns in the data file.
    Please respond and guide me
    thanks

    user444699 wrote:
    Hi All
    I added 2 extra columns to an existing table .
    table tab (ATTD_IND,
    ATTD_ID,
    SEQ_NO,
    CREATE_DATE "to_char(sysdate,'yyyymmdd')",
    CYCLE_DT_CD "to_char(sysdate,'yyyymmdd')",
    CMEH_ID,
    ATTENDEE_TYPE,
    This table is populated using loader. The issue is the file which we get is having data till seq_no .So the ctl. file works as create date and cycle dt are the last columns values defaulted to sysdate. We dont get them in the file. Now the file would have 2 new columns after seq_no , which are cmeh id and attendee type.
    the issue is how to load these using the ctl file. I cant change the table and make create date and cycle date as the last columns. FILLER does not work here as I am not skipping any columns in the data file.
    Please respond and guide me
    thanksEXTERNAL TABLE & custom PL/SQL perhaps?

  • Help with sql loader charsets

    I was wondering if anyone could assist me with a sql loader question. I am trying to use it to load some hungarian data. It always turns the Ő character into an upside down question mark. I understand that it is because the database doesn't understand what that character is. Can someone help me find out how to resolve that? The database is UTF-8. If I paste the character in to the application, it takes it. I have tried all kinds of values for the CHARSET parameter in the .ctl file, but nothing seems to work....

    I believe we are using iso 8859-1.
    I am having a difficult time thinking that it could be we don't have the appropriate installations - because if we paste it in via the oracle application we can see it in a form. If we sql load that same character and look at it in an oracle form, we see the question marks.
    i've looked at many of the documents on tahiti already, and found some helpful stuff, but no explanation for the problem i am having so far :)

  • Unknown issue while loading .dbf file by sql loader

    Hi guys,
    I am having a unknown issue while loading .dbf file by sql loader.
    I need to load .dbf data into oracle table.for this I converted .dbf file by just changing its extension as .csv . file structure after changing .dbf to .csv --
    C_N_NUMBER,COMP_CODE,CPT_CODE,C_N_AMT,CM_NUMBER
    1810/4,LKM,30,45,683196
    1810/5,LKM,30,45,683197
    1810/6,LKM,30,45,683198
    1810/7,LKM,30,135,683200
    1810/8,LKM,30,90,683201
    1810/9,LKM,1,45,683246
    1810/9,LKM,2,90,683246
    1810/10,LKF,1,90,683286
    2810/13,LKJ,1,50.5,680313
    2810/14,LKJ,1,50,680316
    1910/1,LKQ,1,90,680344
    3910/2,LKF,1,238.12,680368
    3910/3,LKF,1,45,680382
    3910/4,LKF,1,45,680395
    7910/5,LKS,1,45,680397
    7910/6,LKS,1,90,680400
    7910/7,LKS,1,45,680401
    7910/8,LKS,1,238.12,680414
    7910/9,LKS,1,193.12,680415
    7910/10,LKS,1,45,680490
    then I am loading it by sql loader.but I am getting always error below ...
    Record 1: Rejected - Error on table C_N_DETL_TAB, column CPT_CODE.
    ORA-01438: value larger than specified precision allowed for this column
    Record 2: Rejected - Error on table C_N_DETL_TAB, column CPT_CODE.
    ORA-01438: value larger than specified precision allowed for this column
    table structure-
    create table C_N_DETL_tab
    "C_N_NUMBER" VARCHAR2(13),
    "COMP_CODE" VARCHAR2(3),
    "CPT_CODE" NUMBER(4),
    "C_N_AMT" NUMBER(20,18),
    "CM_NUMBER" NUMBER(7)
    control file-
    options(skip=1)
    load data
    infile '/softdump/pc/C_N_DETL.csv'
    badfile '/softdump/pc/C_N_DETL.bad'
    discardfile '/softdump/pc/C_N_DETL.dsc'
    into table C_N_DETL_tab
    truncate
    FIELDS TERMINATED BY ","
    OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    C_N_NUMBER CHAR,
    COMP_CODE CHAR,
    CPT_CODE INTEGER,
    C_N_AMT INTEGER,
    CM_NUMBER INTEGER
    but guys when I am increasing size of all columns of tabel upto its max value then data is loaded but when I am checking column max length after data loaded then its very less..
    changed table structure-
    create table C_N_DETL_tab
    "C_N_NUMBER" VARCHAR2(130),
    "COMP_CODE" VARCHAR2(30),
    "CPT_CODE" NUMBER(32), ---- max value of number
    "C_N_AMT" NUMBER(32,18), ---- max value of number
    "CM_NUMBER" NUMBER(32) ---- max value of number
    now i ma running ...
    sqlldr express/express control=C_N_DETL.ctl log=C_N_DETL.log
    o/p-
    Table C_N_DETL_TAB, loaded from every logical record.
    Insert option in effect for this table: TRUNCATE
    TRAILING NULLCOLS option in effect
    Column Name Position Len Term Encl Datatype
    ---------- ---- ---- C_N_NUMBER FIRST * , O(") CHARACTER
    COMP_CODE NEXT * , O(") CHARACTER
    CPT_CODE NEXT 4 INTEGER
    C_N_AMT NEXT 4 INTEGER
    CM_NUMBER NEXT 4 INTEGER
    Table C_N_DETL_TAB:
    20 Rows successfully loaded.
    0 Rows not loaded due to data errors.
    0 Rows not loaded because all WHEN clauses were failed.
    0 Rows not loaded because all fields were null.
    select max(length( CPT_CODE))from C_N_DETL_tab ---> 9
    can u tell me why I need to increase size of table columns upto max value?although length of data is soo much less.
    kindly check it..thnx in advance...
    rgds,
    pc

    No database version of course. Unimportant.
    If I recall correctly, it is 'integer external ' and you would best double quoting the alphanumerics (which you didn't ).
    Try changing integer in integer external in the ctl file.
    Sybrand Bakker
    Senior Oracle DBA

  • Special character loading issue with SQL Loader

    Hi,
    I am getting the special characters as part of my input file to SQL loader. The problem is that because the length of the input string (having special characters) is more than 1000 in input data, the converted bytes length is becoming more than 4000 and the defined substrb() function in control file is not working for it and the target 'ADDR_LINE' column in table 'TEST_TAB' is defined Varchar2(1024 char).
    Following is a sample ctl file and data i am using for it.
    LOAD DATA
    CHARACTERSET UTF8
    INFILE 'updated.txt'
    APPEND INTO TABLE TEST_TAB
    FIELDS TERMINATED BY "|~"
    TRAILING NULLCOLS
    INDX_WORD ,
    ADDR_LINE "SUBSTRB(:ADDR_LINE , 1, 1000)",
    CITY
    following is the actual data which i am receiving as part of input file to sql loader for the ADDR_LINE column:
    'RUA PEDROSO ALVARENGA, 1284 AƒAƒA‚AƒAƒA‚A‚AƒAƒAƒA‚A‚AƒA‚A‚AƒAƒAƒA‚AƒAƒA‚A‚A‚AƒAƒA‚A‚AƒA‚A‚AƒAƒAƒA‚AƒAƒA‚A‚AƒAƒAƒA‚A‚AƒA‚A‚A‚AƒAƒA‚AƒAƒA‚A‚A‚AƒAƒA‚A‚AƒA‚A‚A‚AƒAƒA‚AƒAƒA‚A‚AƒAƒAƒA‚A‚AƒA‚A‚AƒAƒAƒA‚AƒAƒA‚A‚A‚AƒAƒA‚A‚AƒA‚A‚A‚AƒAƒA‚AƒAƒA‚A‚AƒAƒAƒA‚A‚AƒA‚A‚A‚AƒAƒA‚AƒAƒA‚A‚A‚AƒAƒA‚A‚AƒA‚A‚A– 10 ANDAR'
    My database is having following settings.
    NLS_CALENDAR     GREGORIAN
    NLS_CHARACTERSET     AL32UTF8
    NLS_COMP     BINARY
    NLS_CURRENCY     $
    NLS_DATE_FORMAT     DD-MON-RR
    NLS_DATE_LANGUAGE     AMERICAN
    NLS_DUAL_CURRENCY     $
    NLS_ISO_CURRENCY     AMERICA
    NLS_LANGUAGE     AMERICAN
    NLS_LENGTH_SEMANTICS     BYTE
    NLS_NCHAR_CHARACTERSET     AL16UTF16
    NLS_NCHAR_CONV_EXCP     FALSE
    NLS_NUMERIC_CHARACTERS     .,
    NLS_SORT     BINARY
    NLS_TERRITORY     AMERICA
    NLS_TIMESTAMP_FORMAT     DD-MON-RR HH.MI.SSXFF AM
    NLS_TIMESTAMP_TZ_FORMAT     DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_TIME_FORMAT     HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT     HH.MI.SSXFF AM TZR
    Any help in this regard will be much appreciated.
    Thanks in advance.

    Is the data file created directly on the Unix server ? If not, how does it get to the Unix server ? And where does the file come from ? Is the UTF8 locale installed on the Unix server (check with the Unix sysadmin) ?
    HTH
    Srini

Maybe you are looking for