SqlLoader Help!

I'm trying to load a comma-delimited file thru Sqlloader. The problem is due to date columns. The datafile has yyyy-mm-dd hh:mi:ss but all the time part is 00:00:00. In the sqlloader this is what I have given;
EFFECTIVE_DATE "to_date(:EFFECTIVE_DATE, 'YYYY-MM-DD HH:MI:SS')",
But I get an error that HH has to be between 1 and 12. I tried omitting the time part in script but it didn't help.
Any suggestions,
Thx

Tried changing the syntax as per the manual,
EFFECTIVE_DATE DATE "YYYY-MM-DD HH:MI:SS"
but getting the same error - hour must be between 1 and 12

Similar Messages

  • Help needed for creating a SQLLoad control file

    I have 2 fields in my flat file
    If field1 = field2 load only field1 into tn and aux = NULL
    else if field1 != field2 load field1 into tn and field2 = aux
    Here is what I have so far - I need help with the "Where"
    -- ActiveNumbers.dat
    -- Steve J
    load data
    INFILE 'active.date'
    INTO TABLE tmp_ac_active
    APPEND
    FIELDS TERMINATED BY '|'
    (tn CHAR(10), aux CHAR(10))
    Thanks in advance
    Steve

    Thanks Joel
    Using the document you provided here is what I came up with. I notice this is 9i documents - I'm on 8. Does the SQLLoader work the same in both versions?
    This is the first time I've used this tool - No one here has even heard of it. (Well except for the DBA)
    load data
    INFILE 'active.date'
    -- Loads tn and aux if they do not match
    INTO TABLE tmp_ac_active
    WHEN tn != aux
    (tn CHARTERMINATED BY WHITESPACE,
    aux CHAR TERMINATED BY WHITESPACE)
    -- Loads only TN if both are the same
    INTO TABLE tmp_ac_active
    WHEN tn = aux
    (tn POSITION (1:10) CHAR)

  • HELP:Loading XMLtype column from xml file using SQLLOADER

    Hi,
    My table structure is
    crtd_date date,
    xml_doc XMLType
    I have to insert the data dynamically from sqlloader,is it possible? - if it possible please help with controlfile.
    i wrote the controlfile like
    LOAD DATA
    INTO TABLE drvt_xml replace
    XMLType(xmldoc)
    FIELDS TERMINATED BY ',' optionally enclosed by '"'
    crtd_date SYSDATE,
    fname filler char,
    xmldoc lobfile(fname) terminated by eof
    )

    Hi,
    I am having the same issue wer u able to write the control file and did it work?
    If yes pls post ur control file.
    Thanks in advance!!

  • Need help in writing the control file for SQLLOADER

    Is it possible to error out the Sqlloader in case the data fields in the data file for a row are more than the fields stated in the control file?
    i.e. My data file is something like
    aaa,bbb,cc
    dd,eee
    And my ctl file has just 2 columns in it. Is it possible to write a control file which will cause the Sqlloader to error out?
    Thanks...

    Nisha,
    Again I posted test example in your other post but here is how can do that
    CREATE TABLE mytest111 (
       col1 NUMBER,
       col2 NUMBER,
       col3 NUMBER
    LOAD DATA
    TRUNCATE INTO TABLE MYTEST111
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    col1 integer external,
    col2 integer external
    #mytest.dat
    1,2,3
    1,2
    SQL*Loader: Release 10.2.0.1.0 - Production on Fri Apr 10 11:40:39 2009
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Control File:   mytest.ctl
    Data File:      mytest.dat
      Bad File:     mytest.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 USIUSER.MYTEST111, 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
    COL1                                FIRST     *   ,  O(") CHARACTER           
    COL2                                 NEXT     *   ,  O(") CHARACTER           
    Table MYTEST111:
      2 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.
    Space allocated for bind array:                  33024 bytes(64 rows)
    Read   buffer bytes: 1048576
    Total logical records skipped:          0
    Total logical records read:             2
    Total logical records rejected:         0
    Total logical records discarded:        0
    Run began on Fri Apr 10 11:40:39 2009
    Run ended on Fri Apr 10 11:40:40 2009
    Elapsed time was:     00:00:00.99
    CPU time was:         00:00:00.06
    {code}
    Regards                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Urgent help on sqlloader

    Hi
    we are using oracle 9i version of db
    we have columns in a row in a csv file which is having data as
    ?kenneth abusing younger sibling sexually, planning meeting to be held
    12/05/04 - CP1 from H McElroy. Concerns re Kenneth Wayman. A & E form rec'd dated 27/04/04, deliberate self harm, cut left arm with razor blade, no previous h/o self harm. Prev CP concerns re Kenneth, alleged to have SA younger sibling Bryony. Dereg Sept 03, recs handed over from A Okell HV Jan 04. No SHA input with family. Plan - L Collinson SW contacted - aware of incident. Stated was related to allegation made by 12 yr old girl that Kenneth had indecently assaulter her, investigated by Louise, mtg held in sch and with YOT. Investigated with girl and her mother - stated it was a hug but she felt uncomfortable about it. Kenneth has been seen by Gill Smith, CFPU and is now working with YOT around his behaviour. Parents closely monitoring Kenneth at home, not allowed out to associate with young girls. H McElroy. RMP
    23/06/04 - CP1 from H McElroy. CIN reviewed attend 17/06/04 regarding Briony. Briony reported to be happy / relaxed at home. Kenneth no longer at home, is living with aunt nearby. Concerns raised re Georgia, attends soiling clinic, examined by Dr Dale, ?? sexual abuse. Has been referred to Dr Kim Barrett for examination. Also seen by Dr Dale re poor growth. Concerns that Georgia may have also been sexually8 abused. Kenneth has no formal contact with siblings, however does 'bump into' occasionally, due to living inclose proximity. Plan - CBS feel they no longer have a role with Briony, therefore case closed. Due to recent concerns re Georgia, to be open case as CIN pending outcome of medical examination.
    H McElroy. RMP
    0/6/04 Supervision with Helen McElroy SHA. No change to above LS-J
    9/8/04 T/C from Louise Collison SW to plan a strategy meeting to discuss above issues Having difficulties getting police LS-J
    20 9 05 " " " " " " " tomorrow 3.30,police can attend. LS-J
    21/09/04 - Strategy mtg. Longstanding concerns. Bryony was on CPR before 1993, 1992 until 29/09/03, allegation that Kenneth had SA her. Kenneth stayed at home following Kolvin Unit input for Kenneth. April 04 concerns that K Wayman was mtg up with much younger girls, reasons ? of a sexual nature. Bryony seen by Dr Dale at QEH re longstanding soiling probs. Feb 04 noted unusual findings around genital area. Kim Barrett saw Bryony 8 July 04, findings inconclusive. Kenneth sustained injury to eye following physical abuse by stepdad and admitted this. No charges brought. Ken now lives with stepfather's aunt. Attends N'cle College, studying horticulture. Bryony states that Kenneth has 'nipped' her down below. Has had SW therapy. Had Memorandum Interview on 11 August and stated "Kenneth had pulled his pants down and had put his thingy in Bryony's mouth during a game of hide and seek". Incident occurred in 2000. 1992 - Kenneth made allegations re maternal uncle, went to Crown Court. Kenneth too young to give evidence. 2001 Kenneth commenced sexual offending with Georgia (oral sex witnessed). Kenneth has threatened to abduct Jonathon. 2002 Ken has admitted to having SI with Bryony. Bryony examined by Dr Steele. Hymen intact. Mother concerned that Kenneth is grooming Georgia. Mother very depressed and Dad tends to take a lead with household tasks. Mother has been SA in past. Kenneth was SA as a child. Parents are now very keen to have Ken convicted. Parents ? feeding info to children. No recent info re SA. Not rec to have ICPC or Section 47 investigation. Police to continue to gather evidence. M Lilburn. RMP
    07.02.05 - Supervision with Carole Proud, HV. Allocated to Carole Proud. LS-J. MK
    anyideas how this data can be loaded.
    thanks
    kedar

    create table with required data types and then with the help of loader attributes load it.
    Oracle loader can even load data much bigger and complicated than this

  • Need help with sqlloader

    hi friends
    this is my first time with sqlloader but it's not work, I need some one show what i miss here :
    - create a folder (C:\external)
    - i create a text file with name demo1 content the data that i want to export it oracle table  (C:\external\demo1.txt)
    7369,SMITH,CLERK,20
    7499,ALLEN,SALESMAN,30
    7521,WARD,SALESMAN,30
    7566,JONES,MANAGER,20
    7654,MARTIN,SALESMAN,30
    - i create a control file ( (C:\external\ctrl.txt)
    - i create a table in scott schema 
    create table demo1_tab(empno number
                     , ename varchar2(20)
                     , ejob varchar2(30)
                     ,deptno number);
    now this my command prompt error
    C:\external>sqlldr scott/tiger control=C:\external\ctrl.txt
    SQL*Loader: Release 10.2.0.1.0 - Production on Sun May 30 22:27:32 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    SQL*Loader-500: Unable to open file (C:\external\demo1.txt)
    SQL*Loader-553: file not found
    SQL*Loader-509: System error: The system cannot find the file specified.
    SQL*Loader-2026: the load was aborted because SQL Loader cannot continue.
    C:\external>could you plz tell me what is my error
    thanks
    Edited by: user10947262 on May 30, 2010 10:30 PM

    Hello
    - i create a control file ( (C:\external\ctrl.txt)First change the control file extension to to *.ctl*
    SQL*Loader-500: Unable to open file (C:\external\demo1.txt)In the control file you are using demo1.txt which does not exist in C:\external or check the spellings.
    If still not working then can you share the code you used in control file?
    See the below link for more information for Sql Loader.
    http://www.orafaq.com/wiki/SQL*Loader_FAQ
    -Ammad

  • Unable to use sqlloader to load large data into a varchar2 column..plz.help

    Hi,
    Currently the column in the database is a varchar2(4000) coulmn that stores data in the form of xml and data that has many carrriage returns.
    Current I am trying to archive this column value and later truncate the data in this column.
    I was able to create a .csv file but when using the sqlloder ,the utility fails as the data I am about to load has data stored both in the form of "xml" sometimes and sometimes as a list of attributes separated by newline character.
    After several failed attempts... I would like to know if it can be achieved using sqlloader or if sqlloader is a bad choice and i should go for an import/export instead?
    Thanks in advance...
    -Kevin

    Currently the column in the database is a
    varchar2(4000) coulmn that stores data in the form of
    xml and data that has many carrriage returns. Can I ask why your XML data has carriage returns in it? The nature of XML dictates that the structure is defined by the tags. Of course you can have CR's in your actual data between those tags, but if someone is hard coding CR's into the XML to make it look pretty this in not how XML was intended to be used.
    I was able to create a .csv file but when using the
    sqlloder ,the utility fails as the data I am about to
    load has data stored both in the form of "xml"
    sometimes and sometimes as a list of attributes
    separated by newline character.It probably can be (can you provide a sample of data so we can see the structure) but you would probably be best revisiting the code that generates the CSV and ensure that it is output in a simpler format.

  • Need help to resolve errrors in control file

    i created one ctl file to upload data into oracle.
    my data almost like this
    101,1060425123422,100.05
    102,106042523422,101.05
    103,1060425223532,110.05
    104,1060425123422,200
    my contol file like this.
    load data
    INFILE 'CAP.csv'
    APPEND
    INTO TABLE STGION
    fields terminated by ','
    trailing nullcols
    CNTL_NUM,
    TRAN_DT_TM "TO_DATE(substr(:TRAN_DT_TM,2,6)||lpad(substr(:TRAN_DT_TM,8,6),6,'0'),'YYMMDDHH24MISS')",
    TRAN_AMT
    I got error messages like this.
    Record 2: Rejected - Error on table STGION, column TRAN_DT_TM.
    ORA-01850: hour must be between 0 and 23
    could anybody solve this issue.
    I really thankful for your help.

    Worked ok here using a 9.2.0.4 database
    SQL*Loader: Release 10.1.0.4.0 - Production on Tue Apr 25 11:21:43 2006
    Copyright (c) 1982, 2004, Oracle.  All rights reserved.
    Control File:   stgion.ctl
    Data File:      CAP.csv
      Bad File:     CAP.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 STGION, 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
    CNTL_NUM                            FIRST     *   ,       CHARACTER           
    TRAN_DT_TM                           NEXT     *   ,       CHARACTER           
        SQL string for column : "TO_DATE(substr(:TRAN_DT_TM,2,6)||lpad(substr(:TRAN_DT_TM,8,6),6,'0'),'YYMMDDHH24MISS')"
    TRAN_AMT                             NEXT     *   ,       CHARACTER           
    Table STGION:
      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.
    Space allocated for bind array:                  49536 bytes(64 rows)
    Read   buffer bytes: 1048576
    Total logical records skipped:          0
    Total logical records read:             4
    Total logical records rejected:         0
    Total logical records discarded:        0
    Run began on Tue Apr 25 11:21:43 2006
    Run ended on Tue Apr 25 11:21:44 2006
    Elapsed time was:     00:00:01.25
    CPU time was:         00:00:00.02
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.4.0 - Production
    SQL> create table STGION(
      2  cntl_num number,
      3  tran_dt_tm date,
      4  tran_amt number)
      5  /
    Table created.
    SQL> select * from STGION;
      CNTL_NUM TRAN_DT_T   TRAN_AMT
           101 25-APR-06     100.05
           102 25-APR-06     101.05
           103 25-APR-06     110.05
           104 25-APR-06        200
    SQL> alter session set nls_date_format = 'dd-mon-yy hh24:mi:ss';
    Session altered.
    SQL> select * from STGION;
      CNTL_NUM TRAN_DT_TM           TRAN_AMT
           101 25-apr-06 12:34:22     100.05
           102 25-apr-06 02:34:22     101.05
           103 25-apr-06 22:35:32     110.05
           104 25-apr-06 12:34:22        200Could you post your log file - perhaps you have an old version of sqlloader.

  • How to load date and time from text file to oracle table through sqlloader

    hi friends
    i need you to show me what i miss to load date and time from text file to oracle table through sqlloader
    this is my data in this path (c:\external\my_data.txt)
    7369,SMITH,17-NOV-81,09:14:04,CLERK,20
    7499,ALLEN,01-MAY-81,17:06:08,SALESMAN,30
    7521,WARD,09-JUN-81,17:06:30,SALESMAN,30
    7566,JONES,02-APR-81,09:24:10,MANAGER,20
    7654,MARTIN,28-SEP-81,17:24:10,SALESMAN,30my table in database emp2
    create table emp2 (empno number,
                      ename varchar2(20),
                      hiredate date,
                      etime date,
                      ejob varchar2(20),
                      deptno number);the control file code in this path (c:\external\ctrl.ctl)
    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime, ejob, deptno)this is the error :
    C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
    SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 5
    C:\>any help i greatly appreciated
    thanks
    Edited by: user10947262 on May 31, 2010 9:47 AM

    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime, ejob, deptno)Try
    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime "to_date(:etime,'hh24:mi:ss')", ejob, deptno)
    this is the error :
    C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
    SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 5
    C:\>
    That's not an error, you can see errors within log and bad files.

  • Error in scheduling a mapping with sqlloader ctl file

    Hi everyone,
    I have been trying to schedule a single mapping which generates sqlloader ctl file. but i get the error
    ORA-20001: Begin. initialize complete. workspace set. l_job_audit_execution_id= 20545. ORA-20001: Please check execution object is deployed correctly. ORA-01403: no data found ORA-06512: at "USER7.PMAP_TLOG_JOB", line 180 ORA-20001: Please check execution object is deployed correctly. ORA-01403: no data found
    but when i attach this mapping with a process flow it works fine. There is no error.
    so my question is in OWB is it a must that we should attach the mapping which generates sqlloader ctl file to a process flow and then schedule it or can we schedule a single mapping which generates sqlloader ctl file and what should be the process to schedule a single mapping which generates sqlloader ctl file?
    can anyone please help?
    Thanks & Regards
    Subhasree

    Hi Nawneet,
    Any suggestions?
    can anybody else also help me in this error???
    Regards
    Subhasree

  • Can someone help me pls.

    I have a problem in loading my text file. The following error occured. What do I need to do? What does it mean by "Select to upload the data without an erro? Pls. help me.
    len
    1 ERROR OCCURED
    * There are NOT NULL columns in HANDSONXE06.DATABASES. Select to upload the data without an error.
    Type and Method
    Down
    Schema
    Down
    Table Name
    Down
    Data
    Down
    Column Mapping
    Load Data      
    Schema:      HANDSONXE06
    Table Name:      DATABASES
    Define Column Mapping      
    Column Names     COLUMN_NAMES
    Format     FORMAT
    Upload     UPLOAD
    Row 1     db1,10.2.0.1,1
    Row 2     db2,9.2.0.7,1
    Row 3     db3,10.2.0.1,1
    Row 4     db4,10.2.0.1,1
    Row 5     db5,9.2.0.7,1
    Row 6     db6,9.2.0.7,1
    Row 7     db7,9.2.0.7,1

    It might help to diagnose the problem if we had more info on "how" you are loading your text file?
    - Is the text file a series of INSERT statements?
    - Are you using sqlloader to load the file?
    Offhand, I'd say you are trying to load a record from the text file onto a table and you have a null value (or nothing in the text file) for a column that has a NOT NULL restriction. Put another way, you can't load a NULL value into a column that has a NOT NULL restriction.
    hth,
    adym

  • Multibyte character error in SqlLoader when utf8 file with chars like €Ää

    hello,
    posting from Germany, special charactes like german umlaute and euro sign in UTF8 Textfile, SqlLoader rejecting row with Multibyte character error
    Oracle Database 11g Release 11.2.0.2.0 - 64bit Production
    Database Characterset: WE8MSWIN1252
    OS: SLES 11 x86_64
    Testcase SqlDeveloper:
    CREATE TABLE utf8file_to_we8mswin1252 (
    ID NUMBER,
    text VARCHAR2(40 CHAR)
    can't enter euro symbol in this posting, end's in '€' (?)
    SELECT ascii(euro symbol) FROM dual;
    128
    SELECT chr(128) from dual;
    INSERT INTO utf8file_to_we8mswin1252 (ID, text) VALUES (1, '0987654321098765432109876543210987654321');
    INSERT INTO utf8file_to_we8mswin1252 (ID, text) VALUES (2, 'äüöäüöäüöäÄÖÜÄÖÜÄÖÜÄßßßßßßßßß߀€€€€€€€€€');
    INSERT INTO utf8file_to_we8mswin1252 (ID, text) VALUES (3, 'äüöäüöäüöäÄÖÜÄÖÜÄÖÜÄäüöäüöäüöäÄÖÜÄÖÜÄÖÜÄ');
    INSERT INTO utf8file_to_we8mswin1252 (ID, text) VALUES (4, 'ۧۧۧۧۧۧۧۧۧۧ1');
    INSERT INTO utf8file_to_we8mswin1252 (ID, text) VALUES (5, 'äüöäüöäüöäÄÖÜÄÖÜÄÖÜÄäüöäüöäüöä');
    INSERT INTO utf8file_to_we8mswin1252 (ID, text) VALUES (6, 'ßßßßßßßßß߀€€€€€€€€€1');
    INSERT INTO utf8file_to_we8mswin1252 (ID, text) VALUES (7, 'ßßßßßßßßß߀€€€€€€€€€äüöäüöäüöäÄÖÜÄÖÜÄÖÜÄ');
    commit;
    Select shows correct result, no character is wrong or missing!!!!
    put this in a UTF8 file without delimiter and enclosure like
    10987654321098765432109876543210987654321
    the SqlLoader controlfile:
    LOAD DATA characterset UTF8
    TRUNCATE                              
    INTO TABLE utf8file_to_we8mswin1252
    ID CHAR(1)     
    , TEXT CHAR(40)
    on a linux client machine, NOT the Oracle-Server
    export NLS_LANG=AMERICAN_AMERICA.WE8MSWIN1252
    sqlldr user/pwd@connectstring CONTROL=TEST01.ctl DATA=TEST01.dat LOG=TEST01.log
    Record 6: Rejected - Error on table UTF8FILE_TO_WE8MSWIN1252, column TEXT.
    Multibyte character error.
    Record 7: Rejected - Error on table UTF8FILE_TO_WE8MSWIN1252, column TEXT.
    Multibyte character error.
    Select shows missing characters in row 4 and 5, SqlLoader loads only the first 20 characters (maybe at random)
    and as shown above, row 6 and 7 never loaded
    Problem:
    can't load UTF8 Flatfiles with SqlLoader when german umlaute and special characters like euro symbol included.
    Any hint or help would be appreciated
    Regards
    Michael

    ## put this in a UTF8 file without delimiter and enclosure like
    The basic question is how you put the characters into the file. Most probably, you produced a WE8MSWIN1252 file and not an UTF8 file. To confirm, a look at the binary codes in the file would be necessary. Use a hex-mode-capable editor. If the file is WE8MSWIN1252, and not UTF8, then the SQL*Loader control file should be:
    LOAD DATA characterset WE8MSWIN1252
    TRUNCATE
    INTO TABLE utf8file_to_we8mswin1252
    ID CHAR(1)
    , TEXT CHAR(40)
    )-- Sergiusz

  • How to ensure File Read Adapter handles like SQLLOADER's TRAILING NULLCOLS

    I have to read a CSV file which has a specific format but sometimes the trailing columns values can be missing and i would like to handle it in such way that they values are treated as null. This is similar to the SQLLoader's TRAILING NULLCOLS clause.
    Currently if my data is as shown below:
    As-Of Date,As-Of-Time,Bank ID,Bank Name,State,Acct No,Acct Type,Acct Name,Currency,BAI Type Code,Tran Desc,Debit Amt,Credit Amt,0 Day Flt Amt,1 Day Flt Amt,2+ Day Flt Amt,Customer Ref No,Value Date,Location,Bank Reference,Tran Status,Descriptive Text,Descriptive Text1,Descriptive Text2,Descriptive Text3,Descriptive Text4,Descriptive Text5,Descriptive Text6
    20061031,23:59:00,121000248,"WELLS FARGO BANK, N.A.",CA,4121235097,COMMERCIAL DDA,Silicon Image - A/P,USD,475,CHECK PAID,55.86,0,0,0,0,51689,10/31/2006,,IA000313659233,POSTED,,,,,,,
    20061031,23:59:00,121000248,"WELLS FARGO BANK, N.A.",CA,4121235097,COMMERCIAL DDA,Silicon Image - A/P,USD,475,CHECK PAID,1377.57,0,0,0,0,51685,10/31/2006,,IA000210166161,POSTED
    20061031,23:59:00,121000248,"WELLS FARGO BANK, N.A.",CA,4121235097,COMMERCIAL DDA,Silicon Image - A/P,USD,475,CHECK PAID,1435,0,0,0,0,51621,10/31/2006,,IA000627084628,POSTED
    It reads the first row properly , but when in encounters the second row POSTED column , it tries to find the terminated column and since it is not present it reads data from the next line until it finds a comma.
    This is not the way i would like to handle it.
    We get around 1000-2000 records in that CSV from the Bank and they cant change the way they are sending the file. So , please help in resolving this issue.
    Thanks
    Sridhar

    Hi thanks for the reply
    well i've been having a play around but haven't got it to work yet,
    Here's what i have so far
    private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {
             BufferedReader  sb = new BufferedReader();
           sb.append(""+jTextField1.setText()+",");
           sb.append(""+jFormattedTextField1.setText()+"\n");
           sb.append(""+jTextField2.setText()+",");
           sb.append(""+jFormattedTextField2.setText()+"\n");
           sb.append(""+jTextField3.setText()+",");
           sb.append(""+jFormattedTextField3.setText()+"\n");
           sb.append(""+jTextField4.setText()+",");
           sb.append(""+jFormattedTextField4.setText()+"\n");
           sb.append(""+jTextField5.setText()+",");
           sb.append(""+jFormattedTextField5.setText()+"\n");
           ReadFromFile(sb.toString());
        private void ReadFromFile(String s) {
            try {
            BufferedReader in = new BufferedReader(new FileReader("/users/data.txt"));
            String str;
            while ((str = in.readLine()) != null) {
                Process(str);
            in.close();
        } catch (IOException e) {
        }// TODO add your handling code here:
                    }im thinking the problem is the parts that say sb.append but i don't know what to in it's place?

  • Need help in Sql Loader

    Hi sir, i have one file
    cointer header,batch and transactions
    for example,
    0PUAP03 071001721110000012000000037558 (header)
    1200707103137000000010104 (batch)
    2200707103137000000002845014D218499280101 10771450000 (transaction)
    2200707103137000000007259014D506656680103 10770610000 (transaction)
    1200707103108000000027454 (batch)
    2200707103108000000005386014A100048730103 10084780000 (transaction)
    2200707103108000000000856014D206225790303 10085530000 (transaction)
    2200707103108000000002730014D206332650110 10084110000 (transaction)
    2200707103108000000008783014D206805730207 10084730000 (transaction)
    2200707103108000000003687014D207862300207 10084540000 (transaction)
    2200707103108000000003282014D924725690206 10083910000 (transaction)
    2200707103108000000002730014H912454050201 10084220000 (transaction)
    Batch and transactions will be repeated
    I want to use sqlloader to load into 3 tables,header,batch and transaction in one shot,
    for header first characther is 0, for batch first characther is 1 and for transactions is 2
    i need to use running number
    for example
    i have
    header(header_id,date,...)
    batch(header_id,batch_id,..)
    transaction(header_id,batch_id,transaction_id..)
    if i use this
    when (1:1) = 0 {
    header_id hdr_run.nextval
    when (1:1) = 1 {
    header_id hdr_run.currval
    batch_id batch_run.nextval
    when (1:1) = 2 {
    header_id hdr_run.currval
    batch_id batch_run.currval
    transaction_id trans_run.nextval
    if i do like above and if i do each one line is commit then its works but i dunt want it commit in each line,if we not commit in each line then different transactions goes under different batch,so any other idea ,please
    i need it
    thanks in advance

    maybe this example might be of some help.
      Load
      Infile datafile.txt
      Append
      Into table dept
        when deptno !=''
        (deptno position(1:2) char,
         dname position(4:6) char,
         loc position(8:10) char)
      Into table emp
        when empno !=''
        (empno position(12:13) char,
         ename position(15:19) char)

  • Urgent Help !!!  Export data into insert format (Oracle Sql developer)

    Hi all,
    Please help , when i try to export ms access table which have 400,000 over rows to insert format using oracle sql developer 1.5.5. After the export have done the exported file xxx.sql is empty.
    Is it because of too many rows? or what tool or function should i use for exporting table with many rows.
    It used to have exported successfully with
    Insert into table( ) values ();
    Insert into table( ) values ();
    Insert into table( ) values ();
    Insert into table( ) values ();
    ----- when i try to export table with over 10,000 row.
    Regard,
    Tun

    Another option is to export your file as Formatted text (space delimited). This will create a fixed format file. You can either create an external table to access the file or use sqlloader to load it. In your control file or access parameters you will specify the positions of the fields you are interested in. Your control file will look something like this:
    OPTIONS (BINDSIZE=50000,ERRORS=50,ROWS=200,READSIZE=65536)
    LOAD DATA
    CHARACTERSET US7ASCII
    INFILE '/home/FIXED_FORMAT.dat' "FIX 58"
    CONCATENATE 1
    INTO TABLE "EMP2"
    APPEND
    REENABLE DISABLED_CONSTRAINTS
    "ID" POSITION(1:2) INTEGER(2) ,
    "REGION" POSITION(3:3) INTEGER EXTERNAL(1) ,
    "DEPT" POSITION(4:6) INTEGER EXTERNAL(3) ,
    "HIRE_DATE" POSITION(7:14) DATE(8) "mmddyyyy" ,
    "SALARY" POSITION(15:19) DECIMAL(9,2) ,
    "NAME" POSITION(20:34) CHAR(15)
    SQLDeveloper does not currently provide an option to import fixed format files.

Maybe you are looking for

  • Changing iTunes account

    I have just had a replacement iPad 1 as my last one packed up. I set it up on my husbands mac and it has added all his email/iTunes to it. I want to use my iTunes account and email but cant work out how to change it now. Any help greatly appreciated.

  • N95 Bug with FW 31.0.017

    Hi, After upgrading to the new FW 31.0.017 from the 30.0.014 a wired problem starts to happen: When i try to connet to the internet through the Wi-Fi connection (after inserting the password & everything)  it gives me a system error(-1) then, the con

  • Delivery(LF)- Excise Invoice

    Hi Gurus, I want to create Excise invoice from Delivery Doc. without creating commercial invoice/Proforma Excise invoice. is it possible? what exactly process is? Regards, Amol

  • Code page format

    Hi all, The program containing CODE PAGE FORMAT  is working in 4.6 but it's showing error in ECC6.0. Plz help me how to remove this error in ECC6.0. Regards, Sachinn

  • Equlizer problem in N73 Me. Please Help !!!

    Dear All: I am using Nokia N73ME with Firmware V4.0812.4.2.1. I am facing a peculiar problem with Music Player's Equaliser. The problem is, after selecting a Equaliser Preset like Jazz,Pop, Rock etc. The Original preset changed. This problem also occ