SQL loader error ORA-01401:

I am trying to import a .dat file using SQL loader and
i am getting error:ORA-01401: inserted value too large for column and i tried changing the column length to bigger too.
TABLE STRUCTURE
create table NOTE
NOTE_EFF_DATE NUMBER,
NOTE_NDC_NUMBER NUMBER,
NOTE_PREV_NDC_NUMBER NUMBER,
NOTE_DEA_CLASS_CD VARCHAR2(5),
NOTE_PRODUCT_CTGRY_CD VARCHAR2(5),
NOTE_PRODUCT_NAME VARCHAR2(40),
NOTE_FORM_CODE VARCHAR2(5),
NOTE_PRODUCT_STRENGTH VARCHAR2(35),
NOTE_PRODUCT_MSUR_CD VARCHAR2(5),
NOTE_PRODUCT_PKG_SZ NUMBER,
NOTE_PRODUCT_PKG_QTY_CD VARCHAR2(6),
NOTE_THRPTC_CLS_CD NUMBER,
NOTE_AWP_CRT_PRC_EF_DT NUMBER,
NOTE_AWP_CRT_PRC NUMBER,
NOTE_AWP_UNT_PRC NUMBER,
NOTE_AWP_1ST_PRV_UNT_PRC NUMBER
DATA IN .dat FILE:
093083100002035151 401DARVOCET-N 50 TAB 01000EA 0000000001831780008120000008120000007250
093083100002011104 08SODIUM SALICYLATE CAP10 GR 01000EA 2808020070880920005519000005519000005158
.dat FILE format/structure
01 NOTE-REC.
05 NOTE-KEY.
10 NOTE-EFF-DATE.
15 NOTE-EFF-C PIC X(01).
15 NOTE-EFF-YY PIC X(02).
15 NOTE-EFF-MM PIC X(02).
15 NOTE-EFF-DD PIC X(02).
10 NOTE-NDC-NUMBER.
15 NOTE-NDC-NUM-5 PIC X(05).
15 NOTE-NDC-NUM-4 PIC X(04).
15 NOTE-NDC-NUM-2 PIC X(02).
05 NOTE-PREV-NDC-NUMBER.
10 NOTE-NDC-NUM-5 PIC X(05).
10 NOTE-NDC-NUM-4 PIC X(04).
10 NOTE-NDC-NUM-2 PIC X(02).
05 NOTE-DEA-CLASS-CD PIC X(01).
05 NOTE-PRODUCT-CTGRY-CD PIC X(02).
05 NOTE-PRODUCT-NAME PIC X(35).
05 NOTE-FORM-CODE PIC X(03).
05 NOTE-PRODUCT-STRENGTH PIC X(25).
05 NOTE-PRODUCT-MSUR-CD PIC X(02).
05 NOTE-PRODUCT-PKG-SZ PIC 9(05).
05 NOTE-PRODUCT-PKG-QTY-CD PIC X(03).
05 NOTE-THRPTC-CLS-CD PIC 9(10).
05 NOTE-AWP-CRT-PRC-EF-DT PIC 9(05).
05 NOTE-AWP-CRT-PRC PIC 9(05)V99.
05 NOTE-AWP-UNT-PRC PIC 9(04)V9(05).
05 NOTE-AWP-1ST-PRV-UNT-PRC PIC 9(04)V9(05).
Control FILE:
LOAD DATA
INFILE 'NCD.dat'
BADFILE 'NCD.bad'
DISCARDFILE 'NCD.dsc'
INTO TABLE NOTE
REPLACE
FIELDS TERMINATED BY ' '
TRAILING NULLCOLS
NOTE_EFF_DATE POSITION(1:7) INTEGER EXTERNAL NULLIF(NOTE_EFF_DATE=BLANKS),
NOTE_NDC_NUMBER POSITION(8:18) DECIMAL EXTERNAL NULLIF(NOTE_NDC_NUMBER=BLANKS),
NOTE_PREV_NDC_NUMBER POSITION(19:27) DECIMAL EXTERNAL NULLIF(NOTE_PREV_NDC_NUMBER=BLANKS),
NOTE_DEA_CLASS_CD POSITION(28) CHAR NULLIF (NOTE_DEA_CLASS_CD=BLANKS),
NOTE_PRODUCT_CTGRY_CD POSITION(29:30) CHAR NULLIF (NOTE_PRODUCT_CTGRY_CD=BLANKS),
NOTE_PRODUCT_NAME POSITION(31:65) CHAR NULLIF (NOTE_PRODUCT_NAME=BLANKS),
NOTE_FORM_CODE POSITION(66:68) CHAR NULLIF (NOTE_FORM_CODE=BLANKS),
NOTE_PRODUCT_STRENGTH POSITION(69:93) CHAR NULLIF (NOTE_PRODUCT_STRENGTH=BLANKS),
NOTE_PRODUCT_MSUR_CD POSITION(94:95) CHAR NULLIF (NOTE_PRODUCT_MSUR_CD=BLANKS),
NOTE_PRODUCT_PKG_SZ POSITION(96:100) INTEGER EXTERNAL NULLIF (NOTE_PRODUCT_PKG_SZ=BLANKS),
NOTE_PRODUCT_PKG_QTY_CD POSITION(101:103) CHAR NULLIF (NOTE_PRODUCT_PKG_QTY_CD=BLANKS),
NOTE_THRPTC_CLS_CD POSITION(104:113) INTEGER EXTERNAL NULLIF (NOTE_THRPTC_CLS_CD=BLANKS),
NOTE_AWP_CRT_PRC_EF_DT POSITION(114:118) INTEGER EXTERNAL NULLIF (NOTE_AWP_CRT_PRC_EF_DT=BLANKS),
NOTE_AWP_CRT_PRC POSITION(119:225) DECIMAL EXTERNAL NULLIF (NOTE_AWP_CRT_PRC=BLANKS),
NOTE_AWP_UNT_PRC POSITION(226:234) DECIMAL EXTERNAL NULLIF (NOTE_AWP_UNT_PRC=BLANKS),
NOTE_AWP_1ST_PRV_UNT_PRC POSITION(235:245) DECIMAL EXTERNAL NULLIF (NOTE_AWP_1ST_PRV_UNT_PRC=BLANKS)

load data
APPEND into table TBL1
fields terminated by "," optionally enclosed by '"'
TRAILING NULLCOLS          
columnname
)Hi!
Brother, pls give the details of your column. Your exact script. Initially, it seems that - your code is ok. But, that is my guess. Please post the complete script. We cannot say anithing - untill we go through the entire code of your script.
Regards.
Satyaki De.

Similar Messages

  • SQL*LOADER ERROR 비교 (ORA-2359, ORA-1401)

    제품 : ORACLE SERVER
    작성날짜 : 2002-04-09
    SQL*LOADER ERROR 비교 (ORA-2359, ORA-1401)
    ==========================================
    PURPOSE
    SQL*LOADER 를 사용하는 경우 ORA-2359 ERROR가 나는 경우와
    ORA-1401 ERROR가 나는 경우를 비교한다.
    Examples
    table 의 desc가 다음과 같다고 가정하자.
    SQL> create table test5(a varchar2(1000));
    이 경우 delimiter 가 comma 인지 position 으로 구분되는지에 따라 error
    message가 달리 나타난다.
    1) ORA-2359 : field in datafile exceeded maximum specified length
    load data
    infile test.dat
    replace
    into table test5
    fields terminated by ','
    (a char) 로 실행 시 발생.
    ---> a char(1000) 으로 하면 error 해결이 가능하다.
    2) ORA-1401: inserted value too large for column
    load data
    infile test.dat
    replace
    into table test5
    fields terminated by ','
    (a position(1:2000) char)
    ---> 이 경우 a position (1:1000) char 로 하면 해결 가능하다 .
    * 참고로 + , - 기호와 comma 를 load 하기 위해서는 decimal external을
    사용한다. (a position decimal external (10))
    Reference Documents
    ---------------------

    You hit Bug 3531336
    Run the script catcio.sql from $ORACLE_HOME/rdbms/admin directory.
    Run this in sys schema.
    And then load the data with sqlloader.

  • SQL Loader Error : ORA-01830: date format picture ends before converting en

    I am inserting following data
    BES101706     M.E. Deals     7     10/17/2006
    through control file :
    LOAD DATA
    APPEND
    INTO TABLE abc_temp
    FIELDS TERMINATED BY ' '
    TRAILING NULLCOLS
    (BATCH_NAME               ,
    SUPPLIER_NAME          ,
    SUPPLIER_NBR          ,
    INV_DATE "to_date(substr(:INV_DATE,1,10),'MM/DD/YYYY' )"
    But I am getting this error:
    ORA-01830: date format picture ends before converting entire input string
    inv_data is a date field in the database.

    I think it has to do with data format.Exactly.
    You have
    BES101706*M.E.*Deals*7*10/17/2006
    I replace each space with an asterisk. You have 5 columns according to your spec (terminated by '<space>')
    SQL Loader doesn't know that M.E. Deals is the supplier name.
    It's trying to convert 7 as the date.

  • SQL Loader Error ORA-03113

    Hi All,
    I am getting the following error when running sql loader. The SQL Loader Version we are using is Release 9.2.0.5.0. I am using the DIRECT option for SQL Loader as well. Thanks in advance.
    SQL*Loader-961: Error calling once/load finishing for table "TABLE_EX"
    ORA-03113: end-of-file on communication channel
    SQL*Loader-2026: the load was aborted because SQL Loader cannot continue.
    SQL*Loader-925: Error while uldlgs: OCIStmtExecute (ptc_hp)
    ORA-03114: not connected to ORACLE
    SQL*Loader-925: Error while uldlgs: OCIStmtFetch (ptc_hp)
    ORA-24338: statement handle not executed

    You hit Bug 3531336
    Run the script catcio.sql from $ORACLE_HOME/rdbms/admin directory.
    Run this in sys schema.
    And then load the data with sqlloader.

  • SQL*Loader error ORA-00600 and ORA-26095

    Hi all,
    We have a problem with the SQL*Loader Utility. We use an 8i-Database (8.1.7) and SQL*Loader 9.2.0.1.0. We have no Trims or other functions active in the control file and do a direct path load.
    It used to work properly until this morning.
    Now we have the following errors (it is in German - but I can translate it):
    Satz 90153: Abgelehnt - Fehler in Tabelle SCHEMA1.T_IMPORT.
    ORA-00600: Interner Fehlercode, Argumente: [klaprs_50], [7], [], [], [], [], [], []
    ... about 50 equal errors
    Specify SKIP=90171 when continuing the load.
    SQL*Loader-926: OCI-Fehler; uldlm:OCIDirPathFinish für Tabelle SCHEMA1.T_IMPORT
    ORA-26095: Nicht verarbeitete Stream-Daten vorhanden
    SQL*Loader-2026: Der Ladevorgang wurde abgebrochen, weil er nicht fortgesetzt werden kann.
    Specify SKIP=90171 when continuing the load.
    Trnaslation:
    00600 - Internal error code, arguments: ...
    OCI-Fehler = OCI error
    für Tabelle = for table
    ORA-26095: Nicht verarbeitete Stream-Daten vorhanden = Non processed stream data existing
    SQL*Loader-2026: Der Ladevorgang wurde abgebrochen, weil er nicht fortgesetzt werden kann. = Load process has been cancelled as it cannot be continued.
    Has anyone got a clue?!?!?!

    Hi,
    It's very clear that import 9i is for an import into 9i database.
    Upgrade 8i to 9i indicates that we can make an export 8i from 8i database and import 9i into 9i database, but never use a tools like export from other version...
    If you want import data from 9i database into 8i use exp tools 8i, and imp 8i.
    I devise you to read Metalink note 132904.1 - compatibility matrix for export & import between different oracl version.
    Nicolas.

  • Sql load error: ORA-01461: can bind a LONG value only for insert into a LON

    I have 3 columns of varchar2(4000) in my table. I used char(4000) in my ctl. Please see below..
    LOAD DATA
    TRUNCATE INTO TABLE sa.sudhir_MARRIOTT_RBP_FORMAT
    fields terminated by ' '
    TRAILING NULLCOLS
    TARGETING_SECTION,
    TAG_TYPE,
    NO_OFFER_SUPPRESS,
    MAX_OFFER,
    HTML_REGEX,
    HTML_HEADER char(4000),
    HTML_FOOTER char(4000),
    RICH_TEXT_REGEX,
    RICH_TEXT_HEADER,
    RICH_TEXT_FOOTER,
    TEXT_REGEX,
    TEXT_HEADER,
    TEXT_FOOTER
    If I specify char(3000) for HTML_HEADER and char(1000) for HTML_FOOTER it works! (because at this moment html_header is less than 3000 and html_footer data is less than 1000). But I want to load 4000 characters max into both columns too. When I add , it fails with following error,
    ORA-01461: can bind a LONG value only for insert into a LONG column
    Please help !!
    Sudhir

    Anybody have any ideas?

  • EXEC SQL Error: ORA-01401: Inserted value too large for column

    Getting this SQL Error: ORA-01401: Inserted value too large for column..on an EXEC SQL Insert statement when writing to an
    external Oracle DB from SAP.
    On further analysis..it appears that this happens to the fields..when the string length matches the field length.
    Example:  Plant field is defined as char(4) on the SAP side and it is a Varchar2(4) on the Oracle side.
    When a value like '1015' is passed thru a variable in the insert statement then this ORA-01401 error pops up.
    No error:
       - if the value '1015' is passed directly in the insert statement to the external table  (or)
       - when a value with 3 chars or less(like the first three chars..101) is passed thru a variable  defined as 'Plant(4) type c'.
       - when using EXEC sql within SAP
       - when reading from the external db table
    This was working ok until the  Oracle Patch P9147110 was installed recently.
    Any suggestions !

    Hello Dvas,
    what's the characterset of your external database?
    What's the column definition in your external database (byte or character based)?
    If you use a characeterset like UTF8 it is possible, that one character needs more than one byte and then you will run into such kind of issues if the definition is too small.
    Regards
    Stefan

  • SQL Loader Error using regexp_replace

    Hi Guys,
    i am trying to using sql loader to load data and one column in control file is
    x1 POSITION(718:725) DATE "YYYYMMDD" NULLIF FI_CLM_RCPT_DT = BLANKS,
    XYZ POSITION(736:745) CHAR "regexp_replace(substr(:XYZ,1,9),\'[^1|Y|N|U|W]\',\' \')||regexp_replace(substr(:XYZ,10,1),\'[^Z]\', \' \'))")
    But at last part i am getting error
    SQL*Loader-951: Error calling once/load initialization
    ORA-02373: Error parsing insert statement for table TDESAI_DBA.HAJI_CLM_A.
    ORA-00933: SQL command not properly ended
    I know the error is with XYZ Column but where. Or am i doing something wrong?
    Can you guys help me

    Please see the discussion on the Semantic Technologies OTN form at SQL*Loader error 350 using SDO_RDF_TRIPLE_S constructor

  • SQL execution error, ORA-01843: not a valid month

    Im using ASP/VBScript and its my first time starting to use Oracle as a DB provider.
    Just having an issue with a statement that I have.
    Heres my statement:
    SELECT T592_NOON.SHIP_CODE, T592_NOON.REPORT_DATE, T592_NOON.L_B, T592_NOON.AVERAGE_SPEED, T592_NOON.SEASTATE, T592_NOON.DISTANCE, T592_NOON.WIND_DIRECTION, T592_NOON.IFO_MAIN, T592_NOON.IFO_BOILER, T592_NOON.IFO_AUXENGINE FROM T592_NOON WHERE (((SHIP_CODE)='S271') AND (REPORT_DATE BETWEEN to_date('08/02/2004 13:00:00', 'DD-MON-YYYY HH24:MI') and to_date('28/02/2004 18:15:00', 'DD-MON-YYYY HH24:MI')))
    Whenever I run it it errors and returns:
    SQL execution error, ORA-01843: not a valid month
    Can anyone tell why this wouldnt work?
    REPORT_DATE type is DATE
    REPORT_DATE Sample data: 2003-04-28-12.00.00.000000

    Changing the format of the date seemed to fix it.
    Incorrect: '08/02/2004 13:00:00'
    Correct: '08-FEB-2004 13:00'

  • Snapshot refresh error:  ora-01401 inserted value too large for column

    I have an error ora-01401 "Inserted value too large for column" when I try to do a refresh on a group at the materialized view site.
    My model is 1 master replicating to a readonly materialized view site. I have 2 refresh groups for separate sets of tables. 1 refresh group work fine...the other I got the above error.
    I have doubled the rbs and system tablespace without any help thinking that I must be running out of default rollback segment space.
    Anyone has this before?

    The error is related to a field, not to any tablespace. This normaly happens to me when I change the lenght or resolution of a field in the base tables. The structure changes don't "flow" to the materialized view! I must "regenerate" them. Normally droping and creating it again to make them receive the new lenght of that field.
    Sometimes, when the field changed is not part of any primary key I have changes directly the field in the materialized view as if it was a normal table.
    Hope this helps
    Luis

  • SQL*Loader-704 & ORA-12535 error , Oracle 9i AIX, Windows Client

    Hi All,
    I try to run SQL*Loader from Windows Client to Oracle 9i server on AIX. The control file is in the windows machine.
    C:\SqlLdr user/password@myoradb control=mycontrol.ctl
    (the data is 300,000 rows, on the same control file)
    I get this error :
    SQL*Loader-704 : Internal error : ulconnect: OCIServerAttach [0]
    ORA-12535: TNS:Operation timed out.
    FYI, from the same machine, TNSPing is OK, SQL*Plus run perfectly.
    What is wrong here ?
    Should I copy the CTL file into the AIX Server and run the SQL*Plus from AIX client console ?
    Thank you for your help,
    Krist

    Have you checked the sqlnet.log file for an indication of the underlying error? You can also enable network tracing in the sqlnet.ora file, by setting trace_level_client=16.

  • SQL Loader error while loading a date field

    Hi,
    I am getting the below error while I am trying to load a table with a date field using SQL Loader
    Record 1: Rejected - Error on table RPT_HOST_USAGE, column USAGE_TIMESTAMP.
    ORA-01861: literal does not match format string
    My input file is as below
    <code>
    Host_Usage_ID,Host_ID,Technology_ID,Environment_ID,Usage_Timestamp,Avg_CPU_Pct,Avg_Memory_MB,CPU_Spike
    1,12,1,8,'2009-08-01 00:00:00',0.000000000,23875.000000000,0.000000000
    <code>
    My Loader.ctl is
    <code>
    OPTIONS (SKIP=1)
    load data
    infile 'C:\rpt_Host_Usage.txt'
    into table RPT_HOST_USAGE
    fields terminated by ","
    HOST_USAGE_ID,
    HOST_ID,
    TECHNOLOGY_ID,
    ENVIRONMENT_ID,
    USAGE_TIMESTAMP,
    AVG_CPU_PCT,
    AVG_MEMORY_MB,
    CPU_SPIKE
    <code>
    I have tried options like USAGE_TIMESTAMP TO_DATE(USAGE_TIMESTAMP,'YYYY-MM-DD HH24:MI:SS') but didn't work...
    Can you please tell me how to resolve this issue?
    Any pointers on this will be helpful
    Thanks
    Mahesh

    I went back and looked at some of my old *.ctl files and I did something simlilar to what you mentioned and it worked for me, but I had surrounded the option in double-quotes and included a colon in front of the item. Example:
    TECHNOLOGY_ID,
    ENVIRONMENT_ID,
    USAGE_TIMESTAMP "to_date(:USAGE_TIMESTAMP,'YYYY-MM-DD HH24:MI:SS')",
    AVG_CPU_PCT,
    AVG_MEMORY_MB,
    ....

  • SQL*Loader and ORA-00054

    I was wondering if anyone knows a way to prevent ORA-00054 errors on tables when using SQL*Loader. I'm currently invoking scripts that extract data from a source system and load into a table in my database. I'm concurrently invoking the script because I have multiple source systems to improve my overall time for the loads. Sometimes, I get failures on the loads due to ORA-00054 errors. Can this be prevented? Is these a WAIT command/option that can be turned on for SQL*Loader?

    desc toto
    Name Null? Type
    COL1 DATE
    Controlfile :
    load data
    infile 'titi.dat'
    truncate
    into table titi
    (col1 position(1:7) DATE "YYYYMMDD" "DECODE (:col1, '9999999','19990101','000000
    0',null,:col1 + 19000000)")
    Indeed, the input format date is SYYMMDD where S=0 if year=19xx and S=1 if Year=20xx.
    Thanks for your reply.

  • Sql loader error with date format

    Hi everyone,
    I have table and have a data in one coulmn RECORDED_DATE like '20090224' and my client is asking me to load this coulmn data in 'yyyymmdd' format.I am strucked up with my ideas.I used to_date('20090124','yyyymmdd') in control file.but it is also not working Here it is my control file
    LOAD DATA
    INFILE 'C:\xxxx\SQLLDR\HE data\HE_data_Feb.txt'
    BADFILE 'C:\xxxx\SQLLDR\HE data.bad'
    DISCARDFILE 'C:\xxxx\SQLLDR\HE data.dsc'
    INTO TABLE LSCCMGR.FASTPAY_HE_DATA
    REPLACE
    fields terminated by X'09'
    TRAILING NULLCOLS
    (RECORDED_DATE "TO_DATE(:RECORDED_DATE,'mm/dd/yyyy')"
    AGENT_ID
    MEASURE
    TRANSACTIONS
    FEES
    If i excute like this i am getting the error like
    Record 1: Rejected - Error on table LSCCMGR.FASTPAY_HE_DATA, column RECORDED_DATE.
    ORA-01843: not a valid month
    Getting for all records,what i need o change to get the RECORDED_DATE as dateformat.Ple any one help me in this issue to resolve
    How can we perform this using sql loader pls let me know,Thanks in advance.
    Sravan

    Hi,
    &gt;&gt;(RECORDED_DATE "TO_DATE(:RECORDED_DATE,'mm/dd/yyyy')"
    *Change this line to*
    (RECORDED_DATE "TO_DATE(:RECORDED_DATE,'yyyymmdd')"Regards,

  • SQL*Loader Error Field in data file exceeds maximum length", version 8.1.6

    Hi All,
    I am trying to load a data file into a database table using SQL loader. I
    received the data in an data file but I saved it as a pipe delimited
    file.
    When I run the SQL Loader command no records are loaded - looking at the log
    file I get the following error:
    Rejected - Error on table FARESDATA, column FANOTESIN.
    Then I tried with substr and doesnt seem to work for values greater than 4000 chars, it only works if the field value is below 4000 chars (say doing a substr for first 3000 chars).
    see the code--------
    LOAD DATA
    INFILE 'p.dat'
    APPEND INTO TABLE PROSPECTUS
    FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    Fanotesin char(4000) "substr(:fanotesin,1,4000)"
    We get the error ORA-01461: can bind a LONG value only for insert into a LONG column when using substr for 4000 chars.
    Please help!
    Thanks,
    Rajesh
    null

    I believe the problem here is that the ORACLE database regards anything > 4000chs as a CLOB (or LONG). 4000 is the maximum length of a varchar2 field in the database, although of course you can declare larger values in PL/SQL. (Since the incoming data is > 4000 chs it is regarded as a LONG and you cannot therefore use SUBSTR on it)
    I think that you must either truncate your data before loading or load into a table with the offending field as a CLOB (or LONG)
    and then use PL/SQL to recreate it in a table with a varchar2(4000) which is otherwise identical. (You can select from a LONG into a varchar2(32000) for example and then truncate before writing out to the new table).

Maybe you are looking for