SQL Loader error on Fields terminated and optionally enclosed

When you have fields terminated and optionally enclosed, you should be able to have the enclosure characters within the data by doubling them.
So if I have fields terminated by '|' optionally enclosed by '"' and my data has a double quote in it, I can get SQL Loader to take it by replacing the double quote with two double quotes.
But this doesn't always work. For some reason the following string gets the error "no terminator found after TERMINATED and ENCLOSED field"
|"TRO2 ldj?=)(/&%ç*""aàéè_:;!àèé,jpdjbdbd"|
Apparently having the double quote immediately after an asterisk makes SQL Loader not see the second double quote. If I edit it and remove the two double quotes it loads OK. Also if I change the string to
|"TRO2 ldj?=)(/&%ç*aà""éè_:;!àèé,jpdjbdbd"|
Moving the double quote away from the asterisk it loads OK.
Anybody encounter this problem before?

Oracle version is 11.1.0.7.0
OS is Windows 6.1.7601
I can't remove the "optionally enclosed by" clause because we're getting the data from another system. Fortunately this is test data and this particular combination of characters is unlikely to occur in production data.

Similar Messages

  • SQL Loader - Set a field to a CONSTANT and the data is date

    Hi.
    I have a question on SQL Loader.
    I want to load a field(field name is TIME_IN).
    In the Oracle table, this field type is DATE.
    I my csv file, I do not put any value for this field.
    I intend to use CONSTANT variable to this field.
    In my control file, following is the command for above field.
    Hoever, when I run the SQLLoader, it will return me error message which is INVALID MONTH.
    I hope somebody can help and advise me on this matter.
    Thanks.
    INTO TABLE eqreceival_temp
    FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'     
    EQ_NO,
    SIZE_TYPE,
    CUSTOMER,
    CONSTRUCTION,
    QUALITY,
    CONDITION,
    DATE_IN DATE "DD/MM/YYYY",
    TIME_IN CONSTANT '01/01/1999',
    PARK_LOC CONSTANT 'CP',
    STOCK CONSTANT 'S',
    DISCHARGE_PORT CONSTANT 'MYPEN',
    CTYPE CONSTANT 'P',
    ROAD CONSTANT 'Y',
    GATE CONSTANT 'Y',
    SHIPMENT CONSTANT 'Y'
    )

    use to_data function when u r inserting....
    or
    give simply SYSDATE --- AND FIRST CHECK
    --YOU MAY REMOVE CONSTANT KEY WORD.                                                                                                                                                                                                                                                           

  • 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).

  • 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.

  • SQL Loader: ignore data field

    Hi,
    in a SQL Loader control file, how do you specify that you do not wish to load a particular field?
    E.g. if I wanted to ignore the second field in the data file and load the first and third fields into a table, how would I modify the control file below?
    Thanks.
    load data
    infile 'example.dat'
    into table example
    fields terminated by ',' optionally enclosed by '"'
    col1 char,
    ignore char,
    col2 char
    )

    User FILLER keyword:
    col1 char,
    ignore filler char,
    col2 char
    )

  • SQL Loader, CLOB, delimited fields

    Hello.
    I have to load using SQL Loader data from csv file into table, which one field is CLOB type.
    Here is how ctl file initially looked like:
    UNRECOVERABLE
    LOAD DATA
    INFILE '.\csv_files\TSH_DGRA.csv'
    BADFILE '.\bad_files\TSH_DGRA.bad'
    DISCARDFILE '.\dsc_files\TSH_DGRA.dsc'
    APPEND
    INTO TABLE TSH_DGRA
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    ID_OBJ_TSHD,
    PR_ZOOM_TSHD,
    PR_GRID_TSHD,
    PR_ELMGR_TSHD CHAR(4000) OPTIONALLY ENCLOSED BY '<clob>' AND '</clob>',
    PR_ALRMGR_TSHD CHAR(4000) OPTIONALLY ENCLOSED BY '<clob>' AND '</clob>'
    Problems are fields PR_ELMGR_TSHD and PR_ALRMGR_TSHD (CLOBs in table TSH_DGRA). Until data which should be loaded into CLOB fields are under 4000 characters long, it works fine, but what should I do if I want to load data which are longer than 4000 characters?
    If found on Link:[http://download.oracle.com/docs/cd/B14117_01/server.101/b10825/ldr_loading.htm#i1006803] which one sentence said that:
    "SQL*Loader defaults to 255 bytes when moving CLOB data, but a value of up to 2 gigabytes can be specified. For a delimited field, if a length is specified, that length is used as a maximum. If no maximum is specified, it defaults to 255 bytes. For a CHAR field that is delimited and is also greater than 255 bytes, you must specify a maximum length. See CHAR for more information about the CHAR datatype."
    So, my question is, how to specify "up to 2gb" as text said? I can not use CHAR datatype because it is limited to 4000 characters. And I have to load about 60000 characters. I also can not use technique where all data for every CLOB field are in separate files.

    Just specify the maximum expected size:
    PR_ELMGR_TSHD CHAR(100000) OPTIONALLY ENCLOSED BY '<clob>' AND '</clob>',
    PR_ALRMGR_TSHD CHAR(1000000) OPTIONALLY ENCLOSED BY '<clob>' AND '</clob>'
    The CHAR(1000000) will allow SQLLDR to handle up to 1000000 bytes of input text.

  • Need help on sql loader error

    A similar issue is posted on http://www.dbforums.com/database-concepts-design/927987-using-sql-loader-load-data-multiple-files.html, but not a solution yet there, any help on this issue is highly appreciated.
    an alternative solution is also appreciated?
    Thanks!
    Hi All,
    I have a peculiar error while I try to load 2 tables(table name: enroll_emp_back & enroll_dep_back) using SQLLDR, the source file is a .csv file.
    CTL FILE CONTENT:
    LOAD DATA
    TRUNCATE
    INTO TABLE enroll_emp_back
    WHEN (1:8) = 'EMPLOYEE'
    FIELDS TERMINATED BY ","
    OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    (type NULLIF type= BLANKS,
    enrollstmt_ctl_cust_seqnum NULLIF enrollstmt_ctl_cust_seqnum= BLANKS,
    pctl_employee_seqnum NULLIF pctl_employee_seqnum= BLANKS,
    pctl_lot NULLIF pctl_lot= BLANKS,
    pctl_counter NULLIF pctl_counter= BLANKS,
    first_name NULLIF first_name= BLANKS,
    last_name NULLIF last_name= BLANKS,
    mi NULLIF mi= BLANKS,
    ssn NULLIF ssn= BLANKS,
    cssn NULLIF cssn= BLANKS,
    emp_id NULLIF emp_id= BLANKS,
    pin NULLIF pin= BLANKS,
    addr1 NULLIF addr1= BLANKS,
    addr2 NULLIF addr2= BLANKS,
    addr3 NULLIF addr3= BLANKS,
    city NULLIF city= BLANKS,
    state_cd NULLIF state_cd= BLANKS,
    zip NULLIF zip= BLANKS,
    country NULLIF country= BLANKS,
    birth_date NULLIF birth_date= BLANKS,
    hire_date NULLIF hire_date= BLANKS,
    adj_service_date NULLIF adj_service_date= BLANKS,
    elig_date NULLIF elig_date= BLANKS,
    smoker_ind NULLIF smoker_ind= BLANKS,
    spouse_smoker_ind NULLIF spouse_smoker_ind= BLANKS,
    partic_grp_id NULLIF partic_grp_id= BLANKS,
    enroll_window_start NULLIF enroll_window_start= BLANKS,
    enroll_window_end NULLIF enroll_window_end= BLANKS,
    total_ee_cost NULLIF total_ee_cost= BLANKS,
    total_er_cost NULLIF total_er_cost= BLANKS,
    emp_custom1 NULLIF emp_custom1= BLANKS,
    emp_custom2 NULLIF emp_custom2= BLANKS,
    emp_custom3 NULLIF emp_custom3= BLANKS,
    emp_custom4 NULLIF emp_custom4= BLANKS,
    emp_custom5 NULLIF emp_custom5= BLANKS,
    custom1 NULLIF custom1= BLANKS,
    ctl_ins_dttm NULLIF ctl_ins_dttm= BLANKS,
    ctl_upd_dttm NULLIF ctl_upd_dttm= BLANKS,
    ctl_trans_seqnum NULLIF ctl_trans_seqnum= BLANKS,
    ctl_upd_seq NULLIF ctl_upd_seq= BLANKS,
    ctl_deleted_ind NULLIF ctl_deleted_ind= BLANKS,
    ben_year NULLIF ben_year = BLANKS,
    activity_id NULLIF activity_id= BLANKS,
    client_name NULLIF client_name= BLANKS,
    doc_type NULLIF doc_type= BLANKS,
    environment_type NULLIF environment_type= BLANKS
    INTO TABLE enroll_dep_back
    WHEN (1:9) = 'DEPENDENT'
    FIELDS TERMINATED BY ","
    OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    (type NULLIF type= BLANKS,
    enrollstmt_ctl_cust_seqnum NULLIF enrollstmt_ctl_cust_seqnum= BLANKS,
    pctl_employee_seqnum NULLIF pctl_employee_seqnum= BLANKS,
    pctl_enroll_dep_num NULLIF pctl_enroll_dep_num= BLANKS,
    pctl_dep_num NULLIF pctl_dep_num= BLANKS,
    first_name NULLIF first_name= BLANKS,
    last_name NULLIF last_name= BLANKS,
    ssn NULLIF ssn= BLANKS,
    birth_date NULLIF birth_date= BLANKS,
    relation NULLIF relation= BLANKS,
    sex NULLIF sex= BLANKS,
    student_ind NULLIF student_ind= BLANKS,
    disabled_ind NULLIF disabled_ind= BLANKS,
    ctl_ins_dttm NULLIF ctl_ins_dttm= BLANKS,
    ctl_upd_dttm NULLIF ctl_upd_dttm= BLANKS,
    ctl_trans_seqnum NULLIF ctl_trans_seqnum= BLANKS,
    ctl_upd_seq NULLIF ctl_upd_seq= BLANKS,
    ctl_deleted_ind NULLIF ctl_deleted_ind= BLANKS,
    den_covered NULLIF den_covered= BLANKS,
    deplife_covered NULLIF deplife_covered= BLANKS,
    empadd_covered NULLIF empadd_covered= BLANKS,
    med_covered NULLIF med_covered= BLANKS,
    supadd_covered NULLIF supadd_covered= BLANKS,
    suplife_covered NULLIF suplife_covered= BLANKS,
    vis_covered NULLIF vis_covered= BLANKS
    Error I get:
    Table ENROLL_DEP_BACK:
    0 Rows successfully loaded.
    0 Rows not loaded due to data errors.
    1 Row not loaded because all WHEN clauses were failed.
    1 Row not loaded because all fields were null.
    I dont know why the 'ENROLL_DEP_BACK' table is not getting loaded. If i change the above ctl file in such a way that it first loads ENROLL_DEP_BACK table, then the 'enroll_emp_back' table is not getting loaded.
    Please help me on this?
    Source File:
    EMPLOYEE,2322,181340,1,1,Gervaise,Babic,,704345064,704-34-5064,10223914,12345,123 Felton Street,Building 1,Suite 1,Marlborough,WI,53121,USA,11-May-60,9-Mar-09,7-Jan-04,1-Jan-07,N,N,FTNES,15-Apr-09,22-Apr-09,$0.00 ,$96.78 ,9-Apr-09,,,,,,15-Apr-09,15-Apr-09,1103597,4,N,2009,OE,NESTLE,ENROLL,D
    DEPENDENT,2322,181340,1,1,Antony,Broking,765304168,4/26/1962,SP,M,N,N,15-Apr-09,15-Apr-09,1103597,1,N,N,N,N,N,,,N
    SQL command used: SQLLDR wedb/wedbo@nestle_10_sd1 CONTROL=AENUSA2.ctl data=ENROLL.csv LOG=AENUSA.log DIRECT=y
    Thank You
    Edited by: HarinathArasu on Oct 7, 2009 6:26 AM
    Edited by: HarinathArasu on Oct 7, 2009 7:17 AM
    Edited by: HarinathArasu on Oct 7, 2009 8:24 AM
    Edited by: HarinathArasu on Oct 7, 2009 8:24 AM

    When this error occurs it usually means there's some underlying schema changes taking place when you're trying to add a new article
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • 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 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*LOADER ERROR WHILE LOADING ARABIAN DATA INTO UNICODE DATABSE

    Hi,
    I was trying to load arabic data using sql*loader and the datafile is in .CSV format.But i am facing a error Value to large for a column while loading and some data are not loaded due to this error.My target database character set is..
    Characterset : AL32UTF8
    National Character set: AL16UTF16
    DB version:-10g release 2
    OS:-Cent OS 5.0/redhat linux 5.0
    I have specified the characterset AR8MSWIN1256/AR8ISO8859P6/AL32UTF8/UTF8 separately in the sql*loader control file,but getting the same error for all the cases.
    I have also created the table with CHAR semantics and have specified the "LENGTH SEMANTICS CHAR" in the sql*loader control file but again same error is coming.
    I have also changed the NLS_LANG setting.
    I am getting stunned that the data that i am goin to load using sql*loader, it is resided in the same database itself.But when i am generating a csv for those datas and trying to load using sql*loader to the same database and same table structure,i am getting this error value too large for a column.
    whats the probs basically???? whether the datafile is problemetic as i am generating the csv programmetically or is there any problem in my approach of loading unicode data.
    Please help...

    Here's what we know from what you've posted:
    1. You may be running on an unsupported operating system ... likely not the issue but who knows.
    2. You are using some patch level of 10gR2 of the Oracle database but we don't know which one.
    3. You've had some kind of error but we have no idea which error or the error message displayed with it.
    4. You are loading data into a table but we do not have any DDL so we do not know the data types.
    Perhaps you could provide a bit more information.
    Perhaps a lot more. <g>

  • 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 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 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: How to use Sequence and REF together?

    Hi,
    I'm getting the following error:
    SQL*Loader-418: Bad datafile datatype for column AREA_ID.
    I attempt to upload one datafile into 4 different tables.
    When executing sqlldr scott/tiger control=sqlldr_aj_new.ctl
    1) Here is my Control file (sqlldr_aj_new.ctl):
    load data
    infile 'TST_MAIN_NEW.csv'
    -- Loads table "TST_AREAS"
    into table TST_AREAS
    REPLACE
    FIELDS TERMINATED by ','
    (AREA_ID SEQUENCE,
    AREA_NAME,
    PRODUCT_ID,
    PRIORITY_ID,
    PLAN_ID,
    CREATED_BY_ID,
    AREA_DESC)
    -- Loads table "TST_TEMPLATE_SCENS"
    into table TST_TEMPLATE_SCENS
    REPLACE
    FIELDS TERMINATED by ','
    (TEMPLATE_SCEN_ID SEQUENCE,
    SCENARIO_NAME,
    MODIFIED_BY_ID,
    SCEN_TYPE_ID,
    OWNER_ID,
    PRIORITY_ID,
    SCOPE_ID,
    SCENARIO_DESC,
    AREA_ID REF(CONSTANT 'TST_AREAS', AREA_ID))
    2) Here is my data file(TST_MAIN_NEW.csv)
    B/S,105,1,plan_id_1,2222,area_desc1,CCEMC_PR_001,1111,1,2222,2,1,scenario_desc_1
    B/S,105,1,plan_id_2,2222,area_desc2,CCEMC_PR_002,1111,2,2222,2,2,scenario_desc_2
    3) Here are the tables:
    TST_AREAS
    Name Null? Type
    AREA_ID NOT NULL NUMBER(35)
    AREA_NAME CHAR(64)
    PRODUCT_ID NUMBER(35)
    PRIORITY_ID NUMBER(35)
    PLAN_ID NUMBER(35)
    CREATED_BY_ID NUMBER(35)
    AREA_DESC CHAR(1000)
    TST_TEMPLATE_SCENS
    Name Null? Type
    TEMPLATE_SCEN_ID NOT NULL NUMBER(35)
    SCENARIO_NAME CHAR(500)
    MODIFIED_BY_ID NUMBER(35)
    SCEN_TYPE_ID NUMBER(35)
    OWNER_ID NUMBER(35)
    PRIORITY_ID NUMBER(35)
    SCOPE_ID NUMBER(35)
    SCENARIO_DESC CHAR(1000)
    AREA_ID NOT NULL NUMBER(35)
    Please advise what is the reason for an error.
    Thank you very much!
    Andrey

    I don't think so.
    SQL> create table t (
      2  rowid number);
    rowid number)
    ERROR at line 2:
    ORA-00904: : invalid identifierPlease post your version number and the DDL for the table.
    Best practice in Oracle is to NEVER, EVER, store a ROWID: They can change.
    After you have solved the first problem, that you've never actually built the table, the solution to the sequence use is to make the call in your DML.
    INSERT INTO t (testcol) VALUES (<sequence_name>.NEXTVAL);

  • Sql loader error in offline data load

    Hi,
    I have done an offline schema creation using existing tablespace.
    I am trying to do an offline data load using sql loader.The CTL and DAT file are generated by the work bench.
    This is my CTL file code generated by workbench.
    load data
    infile 'Import.dat' "str '<EORD>'"
    into table IMPORT
    fields terminated by '<EOFD>'
    trailing nullcols
    When I am running the ctl file with DAT file in sql loader I am getting the following error
    SQL*Loader-350: Syntax error at line 4.
    Expecting single char, found "<EOFD>".
    fields terminated by '<EOFD>'
    ^
    My Sql Loader version is Release 8.0.6.3.0
    Please help if anyone has came across this issue.
    Thanks in advance.
    Regards
    Saravanan.B

    Saravanan,
    Its a long time since I have seen 8 sql loader. Check the doc. Is it resrticted to a single character delimter??
    Barry

Maybe you are looking for

  • How do I set up multiple e-mail and iCloud accounts on an iPad?

    Hello everyone, I have just purchased an iPhone and an iPad, and have upgraded to Mavericks - and that was only a week ago, so the workings of the cloud are not overly familiar with me yet. I have just discovered to my dismay that unlike my iMac and

  • Apple ID issue - Cannot modify a standard question

    I cannot order books/prints from iPhoto as I have been unable to set up my Apple ID account in iPhoto. I have tracked the problem down to the fact that I am unable to update my profile password question/answer. I have tried to do this via myinfo.appl

  • Switch/case limit

    I am encountering a very strange problem.. after 39 cases in my switch case statement the 40th case does not get executed.. the code is in my go button and there are like 1000+ lines of code in there.. if I replace my 39th case with the 40th it works

  • Plz suggest me on this problem

    hey friends ##problem1 when i am working on my dos prompt to run my rmi programs it provide the following error RemoteException has occured in server thread; nested Exception is: java.rmi.UnmarshallException: while if i run this program to another ma

  • Mount point for swap but /tmp

    Dear All one of my customers is asking me to map a volume from a sotrage to the SWAP , and mount another volume to /tmp from vfstab , the swap is mounted to /tmp How to seperate swap from /tmp ? what would be the solution for this? regards , HEBA