Problem import csv file with SQL*loader and control file

I have a *csv file looking like this:
E0100070;EKKJ 1X10/10 1 KV;1;2003-06-16;01C;75
E0100075;EKKJ 1X10/10 1 KV;500;2003-06-16;01C;67
E0100440;EKKJ 2X2,5/2,5 1 KV;1;2003-06-16;01C;37,2
E0100445;EKKJ 2X2,5/2,5 1 KV;500;2003-06-16;01C;33,2
E0100450;EKKJ 2X4/4 1 KV;1;2003-06-16;01C;53
E0100455;EKKJ 2X4/4 1 KV;500;2003-06-16;01C;47,1
I want to import this csv file to this table:
create table artikel (artnr varchar2(10), namn varchar2(25), fp_storlek number, datum date, mtrlid varchar2(5), pris number);
My controlfile looks like this:
LOAD DATA
INFILE 'e:\test.csv'
INSERT
INTO TABLE ARTIKEL
FIELDS TERMINATED BY ';'
TRAILING NULLCOLS
(ARTNR, NAMN, FP_STORLEK char "to_number(:fp_storlek,'99999')", DATUM date 'yyyy-mm-dd', MTRLID, pris char "to_number(:pris,'999999D99')")
I cant get sql*loader to import the last column(pris) as I want. It ignore my decimal point which in this case is "," and not "." maybe this is the problem. If the decimal point is the problem how can I get oracle to recognize "," as a decimal point??
the result from the import now, is that a decimal number (37,2) becomes 372 in the table

Set NLS_NUMERIC_CHARACTERS environment variable at OS level, before running SqlLoader :
$ cat test.csv
E0100070;EKKJ 1X10/10 1 KV;1;2003-06-16;01C;75
E0100075;EKKJ 1X10/10 1 KV;500;2003-06-16;01C;67
E0100440;EKKJ 2X2,5/2,5 1 KV;1;2003-06-16;01C;37,2
E0100445;EKKJ 2X2,5/2,5 1 KV;500;2003-06-16;01C;33,2
E0100450;EKKJ 2X4/4 1 KV;1;2003-06-16;01C;53
E0100455;EKKJ 2X4/4 1 KV;500;2003-06-16;01C;47,1
$ cat artikel.ctl
LOAD DATA
INFILE 'test.csv'
replace
INTO TABLE ARTIKEL
FIELDS TERMINATED BY ';'
TRAILING NULLCOLS
(ARTNR, NAMN, FP_STORLEK char "to_number(:fp_storlek,'99999')", DATUM date 'yyyy-mm-dd', MTRLID, pris char "to_number(:pris,'999999D99')")
$ sqlldr scott/tiger control=artikel
SQL*Loader: Release 10.1.0.3.0 - Production on Sat Nov 12 15:10:01 2005
Copyright (c) 1982, 2004, Oracle.  All rights reserved.
Commit point reached - logical record count 6
$ sqlplus scott/tiger
SQL*Plus: Release 10.1.0.3.0 - Production on Sat Nov 12 15:10:11 2005
Copyright (c) 1982, 2004, Oracle.  All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> select * from artikel;
ARTNR      NAMN                      FP_STORLEK DATUM      MTRLI       PRIS
E0100070   EKKJ 1X10/10 1 KV                  1 16/06/2003 01C           75
E0100075   EKKJ 1X10/10 1 KV                500 16/06/2003 01C           67
E0100440   EKKJ 2X2,5/2,5 1 KV                1 16/06/2003 01C          372
E0100445   EKKJ 2X2,5/2,5 1 KV              500 16/06/2003 01C          332
E0100450   EKKJ 2X4/4 1 KV                    1 16/06/2003 01C           53
E0100455   EKKJ 2X4/4 1 KV                  500 16/06/2003 01C          471
6 rows selected.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
$ export NLS_NUMERIC_CHARACTERS=',.'
$ sqlldr scott/tiger control=artikel
SQL*Loader: Release 10.1.0.3.0 - Production on Sat Nov 12 15:10:41 2005
Copyright (c) 1982, 2004, Oracle.  All rights reserved.
Commit point reached - logical record count 6
$ sqlplus scott/tiger
SQL*Plus: Release 10.1.0.3.0 - Production on Sat Nov 12 15:10:45 2005
Copyright (c) 1982, 2004, Oracle.  All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> select * from artikel;
ARTNR      NAMN                      FP_STORLEK DATUM      MTRLI       PRIS
E0100070   EKKJ 1X10/10 1 KV                  1 16/06/2003 01C           75
E0100075   EKKJ 1X10/10 1 KV                500 16/06/2003 01C           67
E0100440   EKKJ 2X2,5/2,5 1 KV                1 16/06/2003 01C         37,2
E0100445   EKKJ 2X2,5/2,5 1 KV              500 16/06/2003 01C         33,2
E0100450   EKKJ 2X4/4 1 KV                    1 16/06/2003 01C           53
E0100455   EKKJ 2X4/4 1 KV                  500 16/06/2003 01C         47,1
6 rows selected.
SQL>                                                                            Control file is exactly as yours, I just put replace instead of insert.

Similar Messages

  • SQL Loader and control file changes for different users

    In the front end of my application I can select a data file and a control file, and load data to the table mentioned in .ctl file. Every user who logs in uses the same .ctl file and so loads onto the same table. Now I want the user to load data onto the table in his own schema. I can get the username of the user currently logged in and i want to insert it into that username.table. So can i copy the contents of the .ctl file into a variable, modify it into username.table in that string and pass that variable as a parameter to the sqlldr command instead of the .ctl file.
    Or is there a better way how I can modify the same control file everytime to change tablename to username.tablename in .ctl file and pass to sqlldr to load data to table in local user schema table.
    Thanks and Regards

    Thanks for the reply .. user do have their user credentials but only for the application ... but all users use a common loader and control file once they log into the application. So irrespective of which user is logged in he selects the same control file and loads to the same table mentioned in the control file .. i instead want user to be able to load to the table in control file but into his schema like username.tablename instead of just the tablename mentioned in .ctl file.

  • SQL Loader and control files with WHEN clauses

    Hi All :)
    Want to load data into 3 tables that are defined like so:
    SQL> desc PARENT
    Name NULL? Type
    PKey.........NOT NULL....Number
    Blah_One.................VARHCAR2(50)
    Blah_Two.................VARHCAR2(50)
    SQL> desc CHILD_ONE
    Name NULL? Type
    PKey.........NOT NULL....Number
    FKey.....................Number -- this is used as a Foriegn key to PARNET
    Bleep_One................VARHCAR2(50)
    SQL> desc CHILD_TWO
    Name NULL? Type
    PKey.........NOT NULL....Number
    FKey.....................Number -- this is used as a Foriegn key to PARNET
    Bleep_Two................VARHCAR2(50)
    I have a flat file that looks like this
    PARENT|BLAHBLAH|Blahba|
    ONE|BLEEP-IT|
    ONE|BLEEP-BLOP|
    TWO|TWOBLEEP|
    TWO|OR NOT TO|
    TWO|BLEEP
    PARENT|AbbaDabaDooo|whaaaaa|
    TWO|waka=waka|
    .... so I worte a control file that looks like this ....
    LOAD DATA
    APPEND
    INTO PARENT
    WHEN (tableName='PARENT')
    FIELDS TERMINATED BY '|' TRAILING NULLCOLS
    tableName FILLER,
    BLAH_ONE,
    BLAH_TWO,
    PKey "PARENT_SEQ.nextval"
    INTO CHILD_ONE
    WHEN (tableName='ONE')
    FIELDS TERMINATED BY '|' TRAILING NULLCOLS
    tableName FILLER,
    BLEEP_ONE,
    PKey "CHILD_ONE_SEQ.nextval",
    FKey "PARENT_SEQ.currval"
    INTO CHILD_TWO
    WHEN (tableName='TWO')
    FIELDS TERMINATED BY '|' TRAILING NULLCOLS
    tableName FILLER,
    BLEEP_TWO,
    PKey "CHILD_TWO_SEQ.nextval",
    FKey "PARENT_SEQ.currval"
    where PARENT_SEQ, CHILD_ONE, and CHILD_TWO
    are SEQUENCES.
    The probelm I am having is that the Fkeys and PKeys
    don't match up????
    Am I mis-using SEQUENCES?
    Should I be using a trigger?
    I am very confused!
    Thanks

    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:6020061915147
    answers this question perfectly

  • SQL Loader and control file

    I know I've done this before but, I don't use SQL Loader often and I'm having issues getting a file to load.
    The table has 6 columns in it - one of which is a timestamp.
    I was having issues loading it initially with date format issues. I ruled out any issues with the timestamp format by simply loading a dummy table with some timestamp based data and had no issue.
    So - I think the issue is around the fact that the table I'm loading's first column being a value I'm attempting to default with a sequence when loading and - that I'm screwing up something there.
    Table is as such:
    CREATE TABLE ACS_IPS
        (seq_ips NUMBER,
        col2   VARCHAR2(100),
        col3  VARCHAR2(100),
        col4    VARCHAR2(100),
        col5 TIMESTAMP,
        col6    VARCHAR2(100),
        col7    VARCHAR2(100),
        col8 DATE  DEFAULT SYSDATE NOT NULL,
        col9 VARCHAR2(30) DEFAULT USER);The control file is:
    load data
    truncate
    into table acs_ips
    fields terminated by ","
    trailing nullcols
        seq_ips "seq_ips.nextval",
        col2,
        col3,
        col4,
        col5 TIMESTAMP "YYYY-MM-DD HH24:MI:SS.FF9",
        col6,
        col7
        )The sequence column isn't in the file being loaded... and - there are additional columns that are defaulted on the table that aren't in the control file.
    Any help is appreciated... The error I'm getting is:
    Rejected - Error on table CAMS.ACS_IPS, column ACTION_START.
    ORA-01841: (full) year must be between -4713 and +9999, and not be 0

    Yeah - not sure that clears it up...
    The sequence in my table is the first column - and - I think that's the problem... the sequence is being loaded as the first column in the control file but - it's not in the file being loaded so - it's skewing (again - I think??) the data being read in - which is why I'm getting the timestamp issues on the one column (it's actually reading the next column in the file vs. the actual timestamp one).
    If that's the issue - I'm not sure how to avoid it without restructuring the table to stick the sequence physically at the end. I'm certain that's not necessary and - I'm overlooking something that's otherwise simple but evading me.

  • Problem with loading file with SQL loader

    i am getting a problem with loading a file with SQL loader. The loading is getting
    terminated after around 2000 rows whereas there are around 2700000 rows in the file.
    The file is like
    919879086475,11/17/2004,11/20/2004
    919879698625,11/17/2004,11/17/2004
    919879698628,11/17/2004,11/17/2004
    the control file, i am using is like:-
    load data
    infile 'c:\ran\temp\pps_fc.txt'
              into table bm_05oct06
    fields terminated by ","
    (mobile_no, fcal, frdate )
    I hope, my question is clear. Please help, in solving the doubt.
    regards.

    So which thread is telling the truth?
    Doubt with SQL loader file wih spaces
    Are the fields delimited with spaces or with commas?
    Perhaps they are a mixture of delimiters and that is where the error is coming in?

  • Import and process larger data with SQL*Loader and Java resource

    Hello,
    I have a project to import data from a text file in a schedule. A lager data, with nearly 20,000 record/1 hours.
    After that, we have to analysis the data, and export the results into a another database.
    I research about SQL*Loader and Java resource to do these task. But I have no experiment about that.
    I'm afraid of the huge data, Oracle could be slowdown or the session in Java Resource application could be timeout.
    Please tell me some advice about the solution.
    Thank you very much.

    With '?' mark i mean " How i can link this COL1 with column in csv file ? "
    Attilio

  • SQL loader and stream files with new line '

    I have been trying unsuccessfully to load EDI files using SQL loader. The problem
    is that the lines are terminated by ' and when I use the stream file option it does
    not recognise the line terminator given. As I understand it from the documentation
    this should work - but it does not. I have also used the Hex option with no better
    result. Does anyone have any ideas ?
    I can and have used tr "[']" "[\n]" in Unix to convert the ' to newlines - I just
    wonder am I missing something in SQL loader which will allow me to do this ?
    This is the sql loader control file
    LOAD DATA
    INFILE 'WS860685.MFD' "Str ''' "
    BADFILE 'WS860685.bad'
    DISCARDFILE 'WS860685.dsc'
    INTO TABLE "DUND1"."EDI_LOADED_TEMP"
    REPLACE
    FIELDS TERMINATED BY '+'
    TRAILING NULLCOLS
    (L1,
    L2,
    L3,
    L4,
    L5,
    L6,
    L7,
    L8,
    L9,
    L10,
    L11,
    L12,
    L13,
    L14,
    L15,
    L16,
    L17,
    L18,
    L19,
    L20,
    L21,
    L22,
    L23,
    L24,
    L25,
    L26,
    L27,
    L28,
    L29,
    L30,
    L31,
    L32,
    L33,
    L34,
    L35,
    L36,
    L37,
    L38,
    L39,
    L40,
    LNO)
    Heres a sample of the data
    UNB+UNOA:2+5398888501357+5398888501838+080306:0737+395+ DESADV+++1'UNH+0001+DESADV:D:93A:UN:EAN004'

    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:6020061915147
    answers this question perfectly

  • Problem with SQL*Loader and different date formats in the same file

    DB: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    System: AIX 5.3.0.0
    Hello,
    I'm using SQL*Loader to import semi-colon separated values into a table. The files are delivered to us by a data provider who concatenates data from different sources and this results in us having different date formats within the same file. For example:
    ...;2010-12-31;22/11/1932;...
    I load this data using the following lines in the control file:
    EXECUTIONDATE1     TIMESTAMP     NULLIF EXECUTIONDATE1=BLANKS     "TO_DATE(:EXECUTIONDATE1, 'YYYY-MM-DD')",
    DELDOB          TIMESTAMP     NULLIF DELDOB=BLANKS          "TO_DATE(:DELDOB, 'DD/MM/YYYY')",
    The relevant NLS parameters:
    NLS_LANGUAGE=FRENCH
    NLS_DATE_FORMAT=DD/MM/RR
    NLS_DATE_LANGUAGE=FRENCH
    If I load this file as is the values loaded into the table are 31 dec 2010 and 22 nov *2032*, aven though the years are on 4 digits. If I change the NLS_DATE_FORMAT to DD/MM/YYYY then the second date value will be loaded correctly, but the first value will be loaded as 31 dec *2020* !!
    How can I get both date values to load correctly?
    Thanks!
    Sylvain

    This is very strange, after running a few tests I realized that if the year is 19XX then it will get loaded as 2019, and if it is 20XX then it will be 2020. I'm guessing it may have something to do with certain env variables that aren't set up properly because I'm fairly sure my SQL*Loader control file is correct... I'll run more tests :-(

  • URGENT: Problems Loading files with SQL Loader into a BLOB column

    Hi friends,
    I read a lot about how to load files into blob columns, but I found errors that I can't solve.
    I've read several notes in these forums, ine of them:
    sql loader: loading external file into blob
    and tried the solutions but without good results.
    Here are some of my tests:
    With this .ctl:
    LOAD DATA
    INFILE *
    INTO TABLE mytable
    REPLACE
    FIELDS TERMINATED BY ','
    number1 INTEGER EXTERNAL,
    cad1 CHAR(250),
    image1 LOBFILE(cad1) TERMINATED BY EOF
    BEGINDATA
    1153,/opt/oracle/appl/myapp/1.0.0/img/1153.JPG,
    the error when I execute sqlldr is:
    SQL*Loader-350: Syntax error at line 9.
    Expecting "," or ")", found "LOBFILE".
    image1 LOBFILE(cad1) TERMINATED BY EOF
    ^
    What problem exists with LOBFILE ??
    (mytable of course has number1 as a NUMBER, cad1 as VARCHAR2(250) and image1 as BLOB
    I tried too with :
    LOAD DATA
    INFILE sample.dat
    INTO TABLE mytable
    FIELDS TERMINATED BY ','
    (cad1 CHAR(3),
    cad2 FILLER CHAR(30),
    image1 BFILE(CONSTANT "/opt/oracle/appl/myapp/1.0.0/img/", cad2))
    sample.dat is:
    1153,1153.JPEG,
    and error is:
    SQL*Loader-350: Syntax error at line 6.
    Expecting "," or ")", found "FILLER".
    cad2 FILLER CHAR(30),
    ^
    I tried too with a procedure, but without results...
    Any idea about this error messages?
    Thanks a lot.
    Jose L.

    > So you think that if one person put an "urgent" in the subject is screwing the problems of
    other people?
    Absolutely. As you are telling them "My posting is more important than yours and deserve faster attention and resolution than yours!".
    So what could a typical response be? Someone telling you that his posting is more important by using the phrase "VERY URGENT!". And the next poster may decide that, no, his problem is evern more import - and use "EXTREMELY URGENT!!" as the subject. And the next one then raises the stakes by claiming his problem is "CODE RED! CRITICAL. DEFCON 4. URGENT!!!!".
    Stupid, isn't it? As stupid as your instance that there is nothing wrong with your pitiful clamoring for attention to your problem by saying it is urgent.
    What does the RFC's say about a meaningful title/subject in a public forum? I trust that you know what a RFC is? After all, you claim to have used public forums on the Internet for some years now..
    The RFC on "public forums" is called The Usenet Article Format. This is what it has to say about the SUBJECT of a public posting:
    =
    The "Subject" line (formerly "Title") tells what the message is about. It should be suggestive enough of the contents of the message to enable a reader to make a decision whether to read the message based on the subject alone. If the message is submitted in response to another message (e.g., is a follow-up) the default subject should begin with the four characters "Re: ", and the "References" line is required. For follow-ups, the use of the "Summary" line is encouraged.
    =
    ([url http://www.cs.tut.fi/~jkorpela/rfc/1036.html]RFC 1036, the Usenet article format)
    Or how about [url http://www.cs.tut.fi/~jkorpela/usenet/dont.html]The seven don'ts of Usenet?
    Point 7 of the Don'ts:
    Don't try to catch attention by typing something foolish like "PLEASE HELP ME!!!! URGENT!!! I NEED YOUR HELP!!!" into the Subject line. Instead, type something informative (using normal mixed case!) that describes the subject matter.
    Please tell me that you are not too thick to understand the basic principles of netiquette, or to argue with the RFCs that governs the very fabric of the Internet.
    As for when I have an "urgent" problem? In my "real" work? I take it up with Oracle Support on Metalink by filing an iTAR/SR. As any non-idiot should do with a real-life Oracle crisis problem.
    I do not barge into a public forum like you do, jump up and down, and demand quick attention by claiming that my problem is more important and more urgent and more deserving of attention that other people's problem in the very same forum.

  • Problems with SQL*Loader and java Runtime

    Hi. I'm trying to start SQL*Loader on Oracle 8 by using Runtime class in this way:
    try{
    Process p = Runtime.getRuntime().exec( "c:\oracle\ora81\bin\sqlldr.exe parfile=c:\parfile\carica.par" );
    /*If i insert this line my application never stops*/
    p.waitFor();
    }catch( Exception e ){
    . I have seen that if lines to insert are less then 400 all works very fine, but if lines number is greater than 400, all data go in my tables but my log file is opened always in writing.Can anyone tell me why?
    Thanks

    Just a note if the executable "sqlldr.exe" does not stop (quit running) by itself the p.waitFor() will wait for ever.

  • Loading huge file with Sql-Loader from Java

    Hi,
    I have a csv file with aprox. 3 and a half million records.
    I load this data with sqlldr from within java like this:
               String command = "sqlldr userid=" + user + "/" + pass
                        + "@" + service + " control='" + ctlFile + "'";
                System.out.println(command);
                if (System.getProperty("os.name").contains("Windows")) {
                    p = Runtime.getRuntime().exec("cmd /C " + command);
                } else {
                    p = Runtime.getRuntime().exec("sh -c " + command);
                }it does what I want to, load the data to a certain table, BUT it takes too much time, Is there a faster way to load data to an oracle db from within java?
    Thanks, any advice is very welcome

    Have your DBA work on this issue - they can monitor and check performance of SQL*Loader
    SQL*Loader performance tips          [Document 28631.1]
    SQL*LOADER SLOW PERFORMANCE          [Document 1026145.6]
    Master Note for SQL*Loader          [Document 1264730.1]
    HTH
    Srini

  • SQL*Loader and multiple files

    Hello, am tasked with loading tables with 21+ million rows. Will SQL*Loader perform better with one large file or many smaller files? Is there any ideal file size for optimal performance? Thank you
    David

    Don, when I tried to loada 21M row table using direct, I get the following messages:
    Record 2373: Rejected - Error on table STAGE_CUSTOMER.
    ORA-03113: end-of-file on communication channel
    SQL*Loader-926: OCI error while uldlfca:OCIDirPathColArrayLoadStream for table STAGE_CUSTOMER
    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
    Here is the SQL*Loader log:
    SQL*Loader: Release 9.2.0.1.0 - Production on Thu Apr 26 15:38:29 2007
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Control File: stage_customer.ctl
    Character Set UTF8 specified for all input.
    First primary datafile stage_Customer_20070301.csv has a
    utf8 byte order mark in it.
    Data File: stage_Customer_20070301.csv
    Bad File: stage_Customer_20070301.bad
    Discard File: none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 1000
    Continuation: none specified
    Path used: Direct
    Silent options: FEEDBACK
    Table STAGE_CUSTOMER, 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
    ROW_ID SEQUENCE (MAX, 1)
    CUSTOMER_ACCT_NUM FIRST * , O(") CHARACTER
    IS_DELETED NEXT * , O(") CHARACTER
    SQL string for column : "CASE WHEN UPPER(:Is_Deleted) IN ('FALSE','0') THEN 0 ELSE 1 END"
    NAME_PREFIX NEXT * , O(") CHARACTER
    FIRST_NAME NEXT * , O(") CHARACTER
    MIDDLE_NAME NEXT * , O(") CHARACTER
    LAST_NAME NEXT * , O(") CHARACTER
    NAME_SUFFIX NEXT * , O(") CHARACTER
    NICK_NAME NEXT * , O(") CHARACTER
    ALT_FIRST_NAME NEXT * , O(") CHARACTER
    ALT_LAST_NAME NEXT * , O(") CHARACTER
    MARKETING_SOURCE_ID NEXT * , O(") CHARACTER
    HOME_PHONE NEXT * , O(") CHARACTER
    WORK_PHONE NEXT * , O(") CHARACTER
    MOBILE_PHONE NEXT * , O(") CHARACTER
    ALTERNATE_PHONE NEXT * , O(") CHARACTER
    EMAIL_ADDR NEXT * , O(") CHARACTER
    ALT_EMAIL_ADDR NEXT * , O(") CHARACTER
    BIRTH_DATE NEXT * , O(") CHARACTER
    SQL string for column : "TRUNC(TO_DATE(:Birth_Date, 'MM/DD/YYYY HH24:MI:SS'))"
    SALES_CHANNEL_ID NEXT * , O(") CHARACTER
    SQL string for column : "decode(:Sales_Channel_id,NULL,NULL,NULL)"
    ASSOCIATE_NUMBER NEXT * , O(") CHARACTER
    ALT_ASSOCIATE_NUMBER NEXT * , O(") CHARACTER
    UPDATE_LOCATION_CD NEXT * , O(") CHARACTER
    UPDATE_DATE NEXT * , O(") CHARACTER
    SQL string for column : "TRUNC(TO_DATE(:Update_Date, 'MM/DD/YYYY HH24:MI:SS'))"
    CUSTOMER_LOGIN_NAME NEXT * , O(") CHARACTER
    DISCOUNT_CD NEXT * , O(") CHARACTER
    DISCOUNT_PERCENT NEXT * , O(") CHARACTER
    BUSINESS_NAME NEXT * , O(") CHARACTER
    POS_TAX_FLAG NEXT * , O(") CHARACTER
    POS_TAX_PROMPT NEXT * , O(") CHARACTER
    SQL string for column : "CASE WHEN UPPER(:POS_TAX_PROMPT) IN ('FALSE','0') THEN 0 ELSE 1 END"
    POS_DEFAULT_TAX_ID NEXT * , O(") CHARACTER
    POS_TAX_ID_EXPIRATION_DATE NEXT * , O(") CHARACTER
    POS_AUTHORIZED_USER_FLAG NEXT * , O(") CHARACTER
    SQL string for column : "CASE WHEN UPPER(:POS_AUTHORIZED_USER_FLAG) IN ('FALSE','0') THEN 0 ELSE 1 END"
    POS_ALLOW_PURCHASE_ORDER_FLAG NEXT * , O(") CHARACTER
    SQL string for column : "CASE WHEN UPPER(:POS_ALLOW_PURCHASE_ORDER_FLAG) IN ('FALSE','0') THEN 0 ELSE 1 END"
    ADDRESS1 NEXT * , O(") CHARACTER
    ADDRESS2 NEXT * , O(") CHARACTER
    ADDRESS3 NEXT * , O(") CHARACTER
    CITY NEXT * , O(") CHARACTER
    STATE_CD NEXT * , O(") CHARACTER
    POSTAL_CD NEXT * , O(") CHARACTER
    COUNTRY_CD NEXT * , O(") CHARACTER
    ALLOW_UPDATE NEXT * , O(") CHARACTER
    SQL string for column : "CASE WHEN UPPER(:ALLOW_UPDATE) IN ('FALSE','0') THEN 0 ELSE 1 END"
    ACTION_CODE NEXT * , O(") CHARACTER
    SQL string for column : "CASE WHEN UPPER(:action_code) IN ('FALSE','0') THEN 0 ELSE 1 END"
    ACCOUNT_TYPE_ID NEXT * , O(") CHARACTER
    LOCALE_CD NEXT * , O(") CHARACTER
    SQL string for column : "CASE WHEN :Locale_CD IS NOT NULL AND :Locale_CD LIKE '__-__' THEN :Locale_CD ELSE 'en-US' END"
    IS_READY_FOR_PROCESSING CONSTANT
    Value is '1'
    IS_BUSINESS CONSTANT
    Value is '0'
    HAD_ERRORS CONSTANT
    Value is '0'
    Record 2373: Rejected - Error on table STAGE_CUSTOMER.
    ORA-03113: end-of-file on communication channel
    SQL*Loader-926: OCI error while uldlfca:OCIDirPathColArrayLoadStream for table STAGE_CUSTOMER
    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
    Table STAGE_CUSTOMER:
    0 Rows successfully loaded.
    1 Row 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: 3469
    Total logical records rejected: 1
    Total logical records discarded: 0
    Direct path multithreading optimization is disabled
    Run began on Thu Apr 26 15:38:29 2007
    Run ended on Thu Apr 26 15:38:30 2007
    Elapsed time was: 00:00:01.18
    CPU time was: 00:00:00.32

  • Issue with SQL Loader and tha last field

    Hi
    I have a data file to load . The Load is running fine. But the last record comes with a a junk character. when loaded into the table.
    when we open the file it shows nothing.
    I tried replacing ^M and chr(10) but of no use.
    can you please asssit men in this.. We have a go live soon

    You need to provide us more details...
    SQL and PL/SQL FAQ
    By the way:
    Have you considered using external tables?
    They have more benefits than SQL*Loader...
    http://www.oracle-developer.net/display.php?id=204
    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:6611962171229
    http://www.oracle-base.com/articles/9i/ExternalTables9i.php

  • Loading multiple files with SQL Loader

    Hello.
    I will appreciate your recommendation about the way to load multiple files (to multiple tables) using SQL Loader with only one Control file.
    file1 to load to Table1, file2 to load to Table2 etc.
    How the Control file should look like?
    I was looking on Web, but didn't find exactly what I need.
    Thanks!

    Ctl File : myctl.ctl
    ---------- Start ---------
    LOAD DATA
    INFILE 'F:\sqlldr\abc1.dat'
    INFILE 'F:\sqlldr\abc2.dat'
    INTO TABLE hdfc1
    (TRANS_DATE CHAR,
    NARRATION CHAR,
    VALUE_DATE CHAR,
    DEBIT_AMOUNT INTEGER,
    CREDIT_AMOUNT INTEGER,
    CHQ_REF_NUMBER CHAR,
    CLOSING_BALANCE CHAR)
    INTO TABLE hdfc2
    (TRANS_DATE CHAR,
    NARRATION CHAR,
    VALUE_DATE CHAR,
    DEBIT_AMOUNT INTEGER,
    CREDIT_AMOUNT INTEGER,
    CHQ_REF_NUMBER CHAR,
    CLOSING_BALANCE CHAR)
    -----------End-----------
    Sqlldr Command
    sqlldr scott/tiger@dbtalk control=F:\sqlldr\myctl.ctl log=F:\sqlldr\ddl_file1.txt
    Regards,
    Abu

  • SQL LOADER LPAD CONTROL FILE QUESTION

    Hi, inthe flat file
    company_cd is "1" or "01"
    and center_cd is 3 digits... ex: "493"
    in the table the userid coulmn should be 6 digits
    currently i am getting this as userid in the table
    "010493" is right, because company_cd is "01"
    "10493" is not right, because company_cd is "1"
    if company_cd is 2 digits(01) i am getting 6 digits userid which is OK
    but when company_cd is singile digit(1) i am getting 5 digits userid
    I NEED TO LPAD with 0 in the front when company_cd is "1"any suggetions ???????
    ***********This is the code i am using currently in the CTL file for userid**********
    ,USERID "CONCAT(substr(trim(:company_cd),1,2),lpad(trim(:center_cd),4,0))"
    .......Thank You..........
    Edited by: phani_Marella on Aug 28, 2012 11:12 AM

    Now where does company 'coz' come from all of a sudden?
    I'm sure you read {message:id=9360002} , hence my confusion.
    Anyway, the SQL*Loader forum is @ Export/Import/SQL Loader & External Tables

Maybe you are looking for

  • Prolblem with control of Brooks MFC with FP-AO-200

    When setpoint is 0, the while loop executes only one cycle then stop. When setpoint is not zero, error reportspen current loop detected. The module has detected an open current loop. check wire connections for possible breakage or disconnection. Than

  • IPhoto 9.6 Yosemite asks to do upgrade and then permissions repair

    After the Yosemite upgrade, iPhoto was updated and was all running fine. Could access photos etc.  iPhoto previous version was the Mavericks one, so not v7 or before, requiring the Library upgrade tool. Last night when trying to access iPhoto, it com

  • X3-00 instant messaging -chat not pre-installed

    Recently bought x3-00, but nokia instant messaging (chat) is not preinstalled in it.. any way i can install it??  when i go to the nokia website it says "nokia messaging is preinstalled in your phone"... any suggestions?? thnxs

  • Packet loss down Bt core network

    Hi. I have called so called "broadband Support" about this who put me on to the so called cough cough "tech experts" (lmao) who dont even know what a traceroute is. Sorry I hope not to offend anyone and yes I am rather upset because after keeping me

  • Error During T.code J1iex (Balance in Transaction Currency)

    System not allowing to post excise invoice , and throwing error massage " Balance in Transaction currencey "