SQL*Loader Date issue

How do i get sql loader to recognize recognize AM/PM. My control file is below. The error I get is syntax error at line 14. Expecting field-name, found ")".
OPTIONS ( SKIP=0)
LOAD DATA
INFILE '/ftp_data/labor_scheduling/kronos_punch_temp/kronos_punches.csv'
BADFILE '/ftp_data/labor_scheduling/kronos_punches/kronos_punches.bad'
DISCARDFILE '/ftp_data/labor_scheduling/kronos_punches/kronos_punches.dsc'
INTO TABLE "STAFFING"."KRONOS_TEMP_PUNCHES"
TRUNCATE
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
(EMPLOYEE_ID,
SCHEDULE_DATE DATE "MM/DD/YY",
PUNCH DATE "MM/DD/YY HH:MI AM"
)

Hi Gary,
Could your problem be with this?
(EMPLOYEE_ID,You have no data type for that field.
Regards
Peter

Similar Messages

  • Create sql loader data file dynamically

    Hi,
    I want a sample program/approach which is used to create a sql loader data file.
    The program will read table name as i/p and will use
    select stmt will column list derived from user_tab_columns from data dictionary
    assuming multiple clob columns in the column list.
    Thanks
    Manoj

    I 'm writing clob and other columns to a sql loader dat file.
    Below sample code for writing clob column is giving file write error.
    How can I write multiple clobs to dat file so that control file will handle it correctly
    offset NUMBER := 1;
    chunk VARCHAR2(32000);
    chunk_size NUMBER := 32000;
    WHILE( offset < dbms_lob.getlength(l_rec_type.narrative) )
    LOOP
    chunk := dbms_lob.substr(l_rec_type.narrative, chunk_size, offset );
    utl_file.put( l_file_handle, chunk );
         utl_file.fflush(l_file_handle);
    offset := offset + chunk_size;
    END LOOP;
         utl_file.new_line(l_file_handle);

  • Sql loader - Data loading issue with no fixed record length

    Hi All,
    I am trying to load the following data through sql loader. However the records # 1, 3 & 4 are only loading succesfully into the table and rest of the records showing as BAD. What is missing in my syntax?
    .ctl file:
    LOAD DATA
    INFILE 'C:\data.txt'
    BADFILE 'c:\data.BAD'
    DISCARDFILE 'c:\data.DSC' DISCARDMAX 50000
    INTO TABLE icap_gcims
    TRAILING NULLCOLS
         CUST_NBR_MAIN          POSITION(1:9) CHAR NULLIF (CUST_NBR_MAIN=BLANKS),
         CONTACT_TYPE          POSITION(10:11) CHAR NULLIF (CONTACT_TYPE=BLANKS),
         INQUIRY_TYPE          POSITION(12:13) CHAR NULLIF (INQUIRY_TYPE=BLANKS),
         INQUIRY_MODEL          POSITION(14:20) CHAR NULLIF (INQUIRY_MODEL=BLANKS),
         INQUIRY_COMMENTS     POSITION(21:60) CHAR NULLIF (INQUIRY_COMMENTS=BLANKS),
         OTHER_COLOUR POSITION(61:75) CHAR NULLIF (OTHER_COLOUR=BLANKS),
         OTHER_MAKE          POSITION(76:89) CHAR NULLIF (OTHER_MAKE=BLANKS),
         OTHER_MODEL_DESCRIPTION POSITION(90:109) CHAR NULLIF (OTHER_MODEL_DESCRIPTION=BLANKS),
         OTHER_MODEL_YEAR POSITION(110:111) CHAR NULLIF (OTHER_MODEL_YEAR=BLANKS)
    data.txt file:
    000000831KHAN
    000000900UHFA WANTS NEW WARRANTY ID 000001017OHAL
    000001110KHAP
    000001812NHDE231291COST OF SERVICE INSPECTIONS TOO HIGH MAXIMA 92 MK
    000002015TPFA910115CUST UPSET WITH AIRPORT DLR. $200 FOR PLUGS,OIL,FILTER CHANGE. FW
    Thanks,

    Hi,
    Better if you have given the table structure, I check your script it was fine
    11:39:01 pavan_Real>create table test1(
    11:39:02   2  CUST_NBR_MAIN  varchar2(50),
    11:39:02   3  CONTACT_TYPE varchar2(50),
    11:39:02   4  INQUIRY_TYPE varchar2(50),
    11:39:02   5  INQUIRY_MODEL varchar2(50),
    11:39:02   6  INQUIRY_COMMENTS varchar2(50),
    11:39:02   7  OTHER_COLOUR varchar2(50),
    11:39:02   8  OTHER_MAKE varchar2(50),
    11:39:02   9  OTHER_MODEL_DESCRIPTION varchar2(50),
    11:39:02  10  OTHER_MODEL_YEAR varchar2(50)
    11:39:02  11  );
    Table created.
    11:39:13 pavan_Real>select  * from test1;
    no rows selected
    C:\Documents and Settings\ivy3905>sqlldr ara/ara@pavan_real
    control = C:\control.ctl
    SQL*Loader: Release 9.2.0.1.0 - Production on Sat Sep 12 11:41:27 2009
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    Commit point reached - logical record count 5
    11:42:20 pavan_Real>select count(*) from test1;
      COUNT(*)                                                                     
             5    control.ctl
    LOAD DATA
    INFILE 'C:\data.txt'
    BADFILE 'c:\data.BAD'
    DISCARDFILE 'c:\data.DSC' DISCARDMAX 50000
    INTO TABLE test1
    TRAILING NULLCOLS
    CUST_NBR_MAIN POSITION(1:9) CHAR NULLIF (CUST_NBR_MAIN=BLANKS),
    CONTACT_TYPE POSITION(10:11) CHAR NULLIF (CONTACT_TYPE=BLANKS),
    INQUIRY_TYPE POSITION(12:13) CHAR NULLIF (INQUIRY_TYPE=BLANKS),
    INQUIRY_MODEL POSITION(14:20) CHAR NULLIF (INQUIRY_MODEL=BLANKS),
    INQUIRY_COMMENTS POSITION(21:60) CHAR NULLIF (INQUIRY_COMMENTS=BLANKS),
    OTHER_COLOUR POSITION(61:75) CHAR NULLIF (OTHER_COLOUR=BLANKS),
    OTHER_MAKE POSITION(76:89) CHAR NULLIF (OTHER_MAKE=BLANKS),
    OTHER_MODEL_DESCRIPTION POSITION(90:109) CHAR NULLIF (OTHER_MODEL_DESCRIPTION=BLANKS),
    OTHER_MODEL_YEAR POSITION(110:111) CHAR NULLIF (OTHER_MODEL_YEAR=BLANKS)
    data.txt
    000000831KHAN
    000000900UHFA WANTS NEW WARRANTY ID 000001017OHAL
    000001110KHAP
    000001812NHDE231291COST OF SERVICE INSPECTIONS TOO HIGH MAXIMA 92 MK
    000002015TPFA910115CUST UPSET WITH AIRPORT DLR. $200 FOR PLUGS,OIL,FILTER CHANGE. FW
    CUST_NBR_MAIN     CONTACT_TYPE     INQUIRY_TYPE     INQUIRY_MODEL     INQUIRY_COMMENTS     OTHER_COLOUR     OTHER_MAKE     OTHER_MODEL_DESCRIPTION     OTHER_MODEL_YEAR
    000000831     KH     AN     NULL     NULL     NULL     NULL     NULL     NULL
    000000900     UH     FA      WANTS     NEW WARRANTY ID 000001017OHAL     NULL     NULL     NULL     NULL
    000001110     KH     AP     NULL     NULL     NULL     NULL     NULL     NULL
    000001812     NH     DE     231291C     OST OF SERVICE INSPECTIONS TOO HIGH MAXI     MA 92 MK     NULL     NULL     NULL
    000002015     TP     FA     910115C     UST UPSET WITH AIRPORT DLR. $200 FOR PLU     GS,OIL,FILTER C     HANGE. FW     NULL     NULL- Pavan Kumar N
    Edited by: Pavan Kumar on Sep 12, 2009 11:46 AM

  • SQL LOADER DATA INSERT ISSUES

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

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

  • SQL Loader - data exceeds maximum length

    I am having an issue with SQL Loader falsely reporting that a column is too long in a CSV upload file. The offending column, Notes, is defined in the staging table as VARCHAR2(1000). The text in the Notes column in the upload file for the record that is being rejected is only 237 characters long. I examined the raw data file with a hex editor and there are no special cahracters embedded in the column. The CSV upload was recreated but the false error remains.
    Any ideas what to check? Any suggestion appreciated.
    Here are the pertinent files.
    Control File:LOAD DATA
       INFILE 'Mfield_Upl.dat'
       BADFILE 'Mfield_Upl.bad'
       TRUNCATE
       INTO TABLE Mfield_UPL_Staging
       FIELDS TERMINATED BY ',' optionally enclosed by '"'
         ControlNo CHAR,
         PatientID CHAR,
         CollectDate DATE "MM/DD/YYYY",
         TestDate DATE "MM/DD/YYYY",
         AnalyteDesc CHAR,
         Results CHAR,
         HiLoFlag CHAR,
         LoRange CHAR,
         HiRange CHAR,
         UnitOfMeas CHAR,
         Comments CHAR,
         Notes CHAR,
         ClinicalEvent CHAR,
         OwnerLName CHAR,
         OwnerFName CHAR,
         PetName CHAR,
         AssecNo CHAR,
         SpecimenID CHAR
    {code}
    Staging Table:{code}
    CREATE TABLE Mfield_UPL_Staging
        ControlNo      VARCHAR2(20),
        PatientID      VARCHAR2(9),
        CollectDate    DATE,
        TestDate       DATE,
        AnalyteDesc    VARCHAR2(100),
        Results        VARCHAR2(100),
        HiLoFlag       CHAR(10),
        LoRange        VARCHAR2(15),
        HIRange        VARCHAR2(15),
        UnitOfMeas     VARCHAR2(25),
        Comments       VARCHAR2(100),
        Notes          VARCHAR2(1000),
        ClinicalEvent  VARCHAR2(20),
        OwnerLName     VARCHAR(50),
        OwnerFName     VARCHAR(50),
        PetName        VARCHAR(50),
        AssecNo        NUMBER(10),
        SpecimenID     NUMBER(10)
    {Code}
    Error Log File:{code}
    SQL*Loader: Release 9.2.0.1.0 - Production on Wed Aug 11 08:22:58 2010
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    Control File:   Mfield_UPL_CSV.ctl
    Data File:      Mfield_UPL.dat
      Bad File:     Mfield_Upl.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 MFIELD_UPL_STAGING, loaded from every logical record.
    Insert option in effect for this table: TRUNCATE
       Column Name                  Position   Len  Term Encl Datatype
    CONTROLNO                           FIRST     *   ,  O(") CHARACTER           
    PATIENTID                            NEXT     *   ,  O(") CHARACTER           
    COLLECTDATE                          NEXT     *   ,  O(") DATE MM/DD/YYYY     
    TESTDATE                             NEXT     *   ,  O(") DATE MM/DD/YYYY     
    ANALYTEDESC                          NEXT     *   ,  O(") CHARACTER           
    RESULTS                              NEXT     *   ,  O(") CHARACTER           
    HILOFLAG                             NEXT     *   ,  O(") CHARACTER           
    LORANGE                              NEXT     *   ,  O(") CHARACTER           
    HIRANGE                              NEXT     *   ,  O(") CHARACTER           
    UNITOFMEAS                           NEXT     *   ,  O(") CHARACTER           
    COMMENTS                             NEXT     *   ,  O(") CHARACTER           
    NOTES                                NEXT     *   ,  O(") CHARACTER           
    CLINICALEVENT                        NEXT     *   ,  O(") CHARACTER           
    OWNERLNAME                           NEXT     *   ,  O(") CHARACTER           
    OWNERFNAME                           NEXT     *   ,  O(") CHARACTER           
    PETNAME                              NEXT     *   ,  O(") CHARACTER           
    ASSECNO                              NEXT     *   ,  O(") CHARACTER           
    SPECIMENID                           NEXT     *   ,  O(") CHARACTER           
    Record 1042: Rejected - Error on table MFIELD_UPL_STAGING, column NOTES.
    Field in data file exceeds maximum length
    Table MFIELD_UPL_STAGING:
      3777 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.
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Try:
    -- Etc ...
      Notes CHAR(1000),
    -- Etc ...SQL*Loader limits string buffer to 256 unless specified different.
    :p

  • Sql loader syntax issue

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

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

  • Pre parse terrible SQL Loader data file

    Long story, but I'm on Oracle EBS 11.5.10.2 which means i'm stuck with an SQL Loader from the dark ages (8.06 - yes, I know and yes, it's still supported under EBS).
    Anyhow. I have a vendor sending very annoying data. For example:
    \|"Fan-Hou" dessert|
    \|"Donald is cool | yes”|
    \|"Fred “is” cool | yes”|
    Due to the limitations of such an old SQL Loader, I need to end up with:
    \|"Fan-Hou dessert"|
    \|"Donald is cool | yes”|
    \|"Fred “is” cool | yes”|
    So you can see that really it's only the first row which is causing the issue, I need to shift the quote out to the end of the string (just before the |). The other two lines are just for reference, to show that I get data like that too, and I need to be able to keep that as is.
    I have a rather un-elegant solution solution using perl but I'm sure someone out there knows a clever way to achieve the same result. Before you ask - no, the vendor won't change the data.
    Edited by: user13007502 on 07-May-2013 01:35

    There are probably various ways you can do that. I would try the SED command.
    The idea is the following:
    1. Replace all double quotes of words that start and end with a space with a special character.
    2. Remove all all double quotes.
    3. Add double quotes to the beginning and end.
    4. Reconstruct double quotes of words according to 1.
    For instance:
    $ cat testfile
    |"Fan-Hou" dessert|
    |"Donald is cool | yes"|
    |"Fred "is" cool | yes"|
    Replace double quotes with {} for words that start and end with a space:
    sed -i 's: "\(.*\)" : {\1} :g' testfile
    $ cat testfile
    |"Fan-Hou" dessert|
    |"Donald is cool | yes"|
    |"Fred {is} cool | yes"|
    Remove all double quotes
    $ sed -i 's:"::g' testfile
    $ cat testfile
    |Fan-Hou dessert|
    |Donald is cool | yes|
    |Fred {is} cool | yes|
    Replace all lines that begin and end with | with |" and "|.
    $ sed -i 's:^|:|":g' testfile
    $ sed -i 's:\(.*\)|:\1"|:g' testfile
    $ cat testfile
    |"Fan-Hou dessert"|
    |"Donald is cool | yes"|
    |"Fred {is} cool | yes"|
    Finally replace { and } with double qoutes:
    sed -i 's:{:":g' testfile
    sed -i 's:}:":g' testfile
    Here is the result:
    # cat testfile
    |"Fan-Hou dessert"|
    |"Donald is cool | yes"|
    |"Fred "is" cool | yes"|
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • SQL Loader format issue

    Hello,
    I'm having an issue with the formatting of a date. My csv file, exported from another ora table, has the date in full date format ()
    I get the error:
    Record 12: Rejected - Error on table LOAN_VER_REQ_ARCH, column ORIGINATION_DATE.
    ORA-01843: not a valid monthand two other fields that are date fields get similar errors.
    Dates in .csv file appear as such:
    For example - 10/26/2001 0:00:00
    The question is in my ctl file, how do I format?
    I've tried to_char(ORIGINATION_DATE,'MM-DD-YYYY') or
    to_date(ORIGINATION_DATE,'MM-DD-YYYY') These dont' work. I don't recall doing any of this stuff in Ora 9i, but perhaps I wasn't loading date fields before in any tables I uploaded data into.
    Any tips would be appreciated. I get a message on the command prompt about:
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 39
    Commit point reached - logical record count 78but that's incorrect because no records are going into the table. I'll worry about that part later though if I can get this date thing resolved.
    Thanks!

    user515689 wrote:
    Hello,
    I'm having an issue with the formatting of a date. My csv file, exported from another ora table, has the date in full date format ()
    I get the error:
    Record 12: Rejected - Error on table LOAN_VER_REQ_ARCH, column ORIGINATION_DATE.
    ORA-01843: not a valid monthand two other fields that are date fields get similar errors.
    Dates in .csv file appear as such:
    For example - 10/26/2001 0:00:00
    The question is in my ctl file, how do I format?
    I've tried to_char(ORIGINATION_DATE,'MM-DD-YYYY') or
    to_date(ORIGINATION_DATE,'MM-DD-YYYY') These dont' work. I don't recall doing any of this stuff in Ora 9i, but perhaps I wasn't loading date fields before in any tables I uploaded data into.
    Any tips would be appreciated. I get a message on the command prompt about:
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 39
    Commit point reached - logical record count 78but that's incorrect because no records are going into the table. I'll worry about that part later though if I can get this date thing resolved.
    Thanks!Well, the sample string you've provided doesn't match the formats you've been attempting to use. Yours are separated with a hyphen whereas your sample data is separated by a slash.
    Is ALL the data in the same format?
    If so, perhaps this (based on your sample string)....
    TUBBY_TUBBZ?select to_date('10/26/2001 0:00:00', 'mm/dd/yyyy HH24:MI:SS') from dual;
    TO_DATE('10/26/20010
    26-OCT-2001 12 00:00
    1 row selected.
    Elapsed: 00:00:00.01As for specifying this in the control file
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96652/ch09.htm#1011137
    (you mentioned Oracle 9, so i'm not sure if that's the version you are still on or not).
    Edited by: Tubby on Jul 27, 2010 11:50 AM
    Added link to documentation.

  • SQL*Loader-500 Issue

    Hello
    Using Oracle 11g, I am trying to load a table from data in csv files with oracle SQL Loader,
    table : purchase
    control file : purchase.ctl
    Even if I am giving the right path for control file I still get the error :
    SQL*Loader-500: Unable to open file (purchase.dat)
    SQL*Loader-553: file not found
    SQL*Loader-509: System error: The system cannot find the file specifiedSo why is SQL Loader looking for the file purchase.dat??
    Any help is appreciated

    Talend is the right solution to load data. Now about your problem, have you configured Talend in order to transfer the data? Because Talend can easily transfer the files.
    Maybe you might be able to go to the Talend website to get more information there: http://www.talend.com/

  • SQL*LOADER connection issue

    I have oracle 9i installed, if i'm to connect to the database using the sys account i getv a message saying have to connect as sysdba or sysoper. Ok so i use "username/password@database as sysdba", and that works fine i'm able to connect. But this does not work at the inital login screen, i have to connect as using this other account i created then log in useing the string above. My problem is now im using SQL*LOADER to load data into a table and it won't accept the connection string. If it use that connction string listed above i get the error "ORA-12154:could not resolve service name" and if i remove "as sysdba" from the end of the string i get error "ORA-01017: invalid username/password". I use to be able to just log on with just "sys" username is there any way to change it back or any other way to log on to SQL*LOADER. Any help would be appreciated. Thanks

    When you are working with SQL*Loader, SQL*Plus and other utilities you can specify what is the database to be connected through local naming (client, server ) or seeting an enviroment variable in the session. If you are getting connection in the server and you have problems resolving local naming, I recommend you to do this:
    1.- Set the ORACLE_SID enviroment variable and do not use local naming resolving with tnsnames.ora entries
    2.- Configure very well the tnsnames.ora & sqlnet.ora files to get connection.
    If you are working directly in the server the first option is easier.
    Setting the variable in Windows:
    SET ORACLE_SID=<database_sid>
    Setting the variable in Unix/Linux:
    export ORACLE_SID=<database_sid>
    if you need more help to do this step by step I can help you.
    Joel Pérez

  • SQL Loader Date Problems

    Hi Guys,
    We have a SQL Loader script that used to data in the 'mm/dd/yyyy' format. Post migration of the script onto a seprate server the format is getting stored in 'dd/mm/yyyy' format in a VARCHAR datatype column for DOB.
    Please find below the Loader script :
    "insert into tsa_lists values ('" & ttsa_list_typ & "','" & ttsa_list_num & "',"
                                        if ttsa_list_typ <> "AuthRep" then
                                        inscmd.CommandText= "insert into tsa_lists values ('" & ttsa_list_typ & "','" & ttsa_list_num & "',?,?,?,?,?,?,?,?,?,?,sysdate,?,?)"
                                        inscmd.Parameters.Append inscmd.CreateParameter("ttsa_sid",200,1,30,"")
                                        inscmd.Parameters.Append inscmd.CreateParameter("ttsa_lastname",200,1,500,"")
                                        inscmd.Parameters.Append inscmd.CreateParameter("ttsa_firstname",200,1,500,"")
                                        inscmd.Parameters.Append inscmd.CreateParameter("ttsa_firstletter",200,1,1,"")
                                        inscmd.Parameters.Append inscmd.CreateParameter("ttsa_middlename",200,1,500,"")
                                        inscmd.Parameters.Append inscmd.CreateParameter("ttsa_dob",200,1,100,"")
                                        inscmd.Parameters.Append inscmd.CreateParameter("ttsa_pob",200,1,200,"")
                                        inscmd.Parameters.Append inscmd.CreateParameter("ttsa_citizenship",200,1,200,"")
                                        inscmd.Parameters.Append inscmd.CreateParameter("ttsa_cleared",200,1,3,"")
                                        inscmd.Parameters.Append inscmd.CreateParameter("ttsa_misc",200,1,2000,"")
                                        inscmd.Parameters.Append inscmd.CreateParameter("ttsa_firstname_orig",200,1,500,"")
                                        inscmd.Parameters.Append inscmd.CreateParameter("ttsa_lastname_orig",200,1,500,"")Data coming in the below format:
    SID     CLEARED     LASTNAME     FIRSTNAME     MIDDLENAME     TYPE     DOB     POB     CITIZENSHIP     PASSPORT/IDNUMBER     MISC     
    3799509          A     ABD AL SALAM MARUF ABDALLAH               01-Jul-55                         
    3799512          A     ABD AL SALAM MARUF ABDALLAH               01-Jan-80                         
    3727959          A     KHALID KHALIL IBRAHIM MAHDI               11-Nov-50                         
    3458238          A     KHALID KHALIL IBRAHIM MAHDI               08-Jan-81                         
    3458242          A     KHALID KHALIL IBRAHIM MAHDI               31-Jul-81                         
    3458231          A     KHALID KHALIL IBRAHIM MAHDI               01-Aug-81                         
    2407275          A     MUSA BARARUDDIN Y DAGAM               19-Aug-62                         
    Please can you guys suggest a way.
    Cheers,
    Shazin

    1) That does not look like anything recognized by "SQL*Loader" utility.
    2) If you just really mean a "sql" statement to load data...then:
    a) If table column is date type, then use the TO_DATE() function
    b) If column is Varchar2 you should not save date's in a varchar2 column.
    In any case check out the NLS_DATE_FORMAT parameter on the database and or the same parameter on client side.
    :p

  • Sql Loader Data Import Error!!!

    Hi,
    I have to import a huge volume of records from a CSV(150MB) file to table using sql loader. The input file contains '3286909' records. I am using the following control file and command to run the sql loader.
    Control File:
    lload data
    infile Test.csv
    into table TEST_LOAD
    fields terminated by ',' optionally enclosed by '"'
    ID integer external,
    PATH char
    *Command:* --------------
    C:\CSVFiles\CSV>sqlldr system/tiger control= test.ctl log=test.log readsize=200000000 bindsize=200000000
    After running the above command I am able to import '1215717'. Once sql loader reaches this limit then it stops without any error. Somtimes I would get 'SQL*Loader-510: Physical record in data file (test.csv) is longer than the maximum(1048576)'
    Please help me to perform this import operation.
    Thanks

    http://www.morganslibrary.org/reference/externaltab.html
    Example:
    I have a file on my server in a folder c:\mydata called text.csv which is a comma seperated file...
    1,"Fred",200
    2,"Bob",300
    3,"Jim",50As sys user:
    CREATE OR REPLACE DIRECTORY TEST_DIR AS "c:\mydata";
    GRANT READ, WRITE ON DIRECTORY TEST_DIR TO myuser;Note: creates a directory object, pointing to a directory on the server and must exist on the server (it doesn't create the physical directory).
    As myuser:
    SQL> CREATE TABLE ext_test
      2    (id      NUMBER,
      3     empname VARCHAR2(20),
      4     rate    NUMBER)
      5  ORGANIZATION EXTERNAL
      6    (TYPE ORACLE_LOADER
      7     DEFAULT DIRECTORY TEST_DIR
      8     ACCESS PARAMETERS
      9       (RECORDS DELIMITED BY NEWLINE
    10        FIELDS TERMINATED BY ","
    11        OPTIONALLY ENCLOSED BY '"'
    12        (id,
    13         empname,
    14         rate
    15        )
    16       )
    17     LOCATION ('test.csv')
    18    );
    Table created.
    SQL> select * from ext_test;
            ID EMPNAME                    RATE
             1 Fred                        200
             2 Bob                         300
             3 Jim                          50
    SQL>
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Sql loader -  to_date() issue

    How do I load the date field from the CSV *"03-Dec-09 10.06.58.00 PM"* into oracle tables using sql loader ?
    The contol file is as follows:
    LOAD DATA
    INTO TABLE
    CUSTOMER
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    (CUST_ID,
    ORDER_DATE "to_date(:ORDER_DATE, 'DD-MON-YY HH:MI:SS.TT AM')"
    but it doesn't work, I also tried _ORDER_DATE "DD/MM/YYYY"_ with no luck, any suggestion ?
    I am kind of new in using SQL LOADER.
    thanks.

    The CSV sample you provided uses " *.* " in the time-component [ 10.06.58.00 ] while your SQL Loader Control file is expecting " *:* " [ HH:MI:SS.TT ]. These two formats are obviously not the same. Update your control file and try again.
    CUST_ID, ORDER_DATE
    1,03-Dec-10 10.06.58.00 PM
    2,03-Dec-09 10.07.18.00 PM
    3,03-Dec-11 04.07.18.00 AM
    4,01-Dec-07 10.07.18.00 PM
    5,03-Dec-10 10.07.18.00 AM
    6,12-Dec-10 10.07.18.00 PM
    CONTROL FILE Which "doesn't work "
    LOAD DATA
    INTO TABLE
    CUSTOMER
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    (CUST_ID,
    ORDER_DATE "to_date(:ORDER_DATE, 'DD-MON-YY HH:MI:SS.TT AM')"
    {code}
    Edited by: user130038 on Sep 9, 2011 6:56 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • SQL*Loader .dat file

    Hello I am trying to migrate large quantities of data from our Access database to Oracle. I managed to generate my SQL*Loader scripts in the OMWB directory but when I try to run the .bat file a text doc is generated with the following message:
    SQL*Loader-128: unable to begin a session
    ORA-01017: Invalid username/password: logon denied
    I have tried to match the username/password in both my OEM an OMWB with no success. Please does anybody know where I am going and how it can be rectified. Or should I recreate the user again via OMWB?
    Thank you
    [email protected]

    Pilton,
    I assume the problem with the username and password which you are using to run.
    And one more thing that check the session previleges on the user side.
    Hope it will help you.
    Ramesh
    Hello I am trying to migrate large quantities of data from our Access database to Oracle. I managed to generate my SQL*Loader scripts in the OMWB directory but when I try to run the .bat file a text doc is generated with the following message:
    SQL*Loader-128: unable to begin a session
    ORA-01017: Invalid username/password: logon denied
    I have tried to match the username/password in both my OEM an OMWB with no success. Please does anybody know where I am going and how it can be rectified. Or should I recreate the user again via OMWB?
    Thank you
    [email protected]

  • SQL loader import issue..

    Hi,
    I am working on 10g database on ibm AIX ..
    i need to use sql loader and insert some data in to table using a input file.
    The input file contains follwing format..- data.dat
    001 901 200 1611196 "dis
    ltype
    gu" Mhamicddu kuasa 12as king
    all these values are tab deliminated and one column value "disltypegu" is enclosed by " " and in next line. This "disltypegu" shuld be inserted in to one column.
    I am using following control file..
    LOAD DATA
    INFILE '/home/oracle/data.dat'
    INSERT INTO TABLE emp
    (e1,e2,e3,e4,e5,e6,e7,e8,e9)
    any idea ...wht all things i need to include in my control file to perform this insert...
    I am using below control file ..
    LOAD DATA
    INFILE '/home/oracle/data1.csv'
    APPEND
    INTO TABLE emp
    FIELDS TERMINATED BY X'09'
    OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    (ename,edd,emob)
    By using this control file , we can import tab delemenated and enclosed by "" column ...it is working ..
    Only thing is if some column data is in next row , it is treating it as a second row and inserting in to new row..
    How to insert data in to one row..
    This is my data file ... with 3 column values .. ( ename -Robin , edd - Address , emob - 13)
    Robin "Address"
    13
    but it is inserting emob value (13) in ename ...like next line as a new row...

    oradba11 wrote:
    Hi,
    I am working on 10g database on ibm AIX ..
    i need to use sql loader and insert some data in to table using a input file.
    The input file contains follwing format..- data.dat
    001 901 200 1611196 "dis
    ltype
    gu" Mhamicddu kuasa 12as king
    all these values are tab deliminated and one column value "disltypegu" is enclosed by " " and in next line. This "disltypegu" shuld be inserted in to one column.
    I am using following control file..
    LOAD DATA
    INFILE '/home/oracle/data.dat'
    INSERT INTO TABLE emp
    (e1,e2,e3,e4,e5,e6,e7,e8,e9)
    any idea ...wht all things i need to include in my control file to perform this insert...
    I am using below control file ..
    LOAD DATA
    INFILE '/home/oracle/data1.csv'
    APPEND
    INTO TABLE emp
    FIELDS TERMINATED BY X'09'
    OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    (ename,edd,emob)
    By using this control file , we can import tab delemenated and enclosed by "" column ...it is working ..
    Only thing is if some column data is in next row , it is treating it as a second row and inserting in to new row..
    How to insert data in to one row..
    This is my data file ... with 3 column values .. ( ename -Robin , edd - Address , emob - 13)
    Robin "Address"
    13
    but it is inserting emob value (13) in ename ...like next line as a new row...How is this data file created and what processes (automated AND manual) does it pass through before coming to sqlloader? It looks to me like it is getting manually copied and pasted from notepad with line wrap turned on. You really need to address why the data is being wrapped across multiple lines (records).
    Edited by: EdStevens on Mar 13, 2012 7:48 AM

Maybe you are looking for

  • I can no longer send mail from my gmail account on my iPad.

    I can send mail from my iPhone just fine so it isn't gmail. I deleted the gmail app and reinstalled it; restarted my iPad; and checked the settings. My wifi is working as is evidenced by the fact that I wrote and posted this from my iPad with no prob

  • New iPod nano cases from the DigitalLife Expo NYC

    For those not able to make it to the DigitalLife Expo in NYC... RainyDayMagazine was there reporting live today. http://www.rainydaymagazine.com/RDM2005/Destinations/RDMDestinationsDigitalLife0 5.htm We paid special attention to folks show iPod nano

  • Data is not populate into base table

    Hi all, I am using Oracle EBS R12 and OS is WIN XP. I am working in PO module.The data is not populating into the base table after running the concurrent program.Instead,the interface error table is populated with the error. The error is :-- Bill to

  • Reboot fails after software update - what now?

    I've just performed a regular software update. I think it included the following 4 items: - iPhoto 08 (enhanced printing etc.) - Raw module update - 10.5.5 update - ??? don't remember this one Three of the updates required a reboot so I opted to rebo

  • Link to BEx Workbook in STS

    Hi, We have Bex workbooks created as planning applications in IP. Could anyone suggest how these workbooks can be called from STS? For web applications we can provide the link to planning application directly in the STS customizing but not sure how w