Sql Loader Vs External table? Which one is preffered?

Hello guru,
We trying to load the data into about 160 tables. Here are the following things we are doing currently,
1. We get the flat file in .txt format
2. We are writing the control file for each flat file for thier respective tables
3.And we are using sql loader command to load this data into the table.
I was wondering if this process is cumbersome, and i m not sure if external table could be simple in loading the tables compared to what we are doing ?And i have not used external tables, so wanted to know which on eis better ? So any idea is greatly appriciated !
FYI.. Version :- Oracle 11g
Thank you so much!

Thanks for you reply justin !
I found the below example for loading the data into external table...
CREATE OR REPLACE DIRECTORY dat_dir AS 'C:\Oradata\Data';
CREATE OR REPLACE DIRECTORY log_dir AS 'C:\Oradata\Log';
CREATE OR REPLACE DIRECTORY bad_dir AS 'C:\Oradata\Bad';
GRANT READ ON DIRECTORY dat_dir TO scott;
GRANT WRITE ON DIRECTORY log_dir TO scott;
GRANT WRITE ON DIRECTORY bad_dir TO scott;
CREATE TABLE revext (person      VARCHAR2(20),
                     rev_jan     NUMBER(4),
                     rev_feb     NUMBER(4),
                     rev_mar     NUMBER(4),
                     rev_apr     NUMBER(4),
                     rev_mai     NUMBER(4),
                     rev_jun     NUMBER(4),
                     rev_jul     NUMBER(4),
                     rev_aug     NUMBER(4),
                     rev_sep     NUMBER(4),
                     rev_oct     NUMBER(4),
                     rev_nov     NUMBER(4),
                     rev_dez     NUMBER(4))
ORGANIZATION EXTERNAL
   TYPE ORACLE_LOADER
   DEFAULT DIRECTORY dat_dir
   ACCESS PARAMETERS
     records delimited by newline
     badfile bad_dir:'revext%a_%p.bad'
     logfile log_dir:'revext%a_%p.log'
     fields terminated by ','
     missing field values are null
     ( person,
       rev_jan,
       rev_feb,
       rev_mar,
       rev_apr,
       rev_mai,
       rev_jun,
       rev_jul,
       rev_aug,
       rev_sep,
       rev_oct,
       rev_nov,
       rev_dez
   LOCATION ('revext.dat')
PARALLEL 4
REJECT LIMIT UNLIMITED;
CREATE TABLE revenue (
    person       VARCHAR2(20),
    month        VARCHAR2(3),
    revenue      NUMBER,
    CONSTRAINT revenue_pk PRIMARY KEY (person,month));
INSERT INTO revenue (person,month,revenue)
   SELECT person,'Jan',rev_jan
   FROM revext--but currently we are using sql loader, our data looks like this
  1119Smith      01/01/1982AXYZ corporation  xyz corp
  1111collen      01/01/1990AABC corporation  abc corp
     and control file is like this
INTO TABLE "XYZ_tbl"
   ID                     POSITION(01:05)        CHAR                  "DECODE(RTRIM(:ID), NULL, 'NA', :ID)"       ,
   Name                POSITION(06:15)        CHAR                  "DECODE(RTRIM(:NAME), NULL, 'NA', :Name)"   ,
   Act_dt              POSITION(16:25)        DATE                  "MM/DD/YYYY" NULLIF ACT_DT=BLANKS
My question is, can i use the options like NULLIF/ DECODE or changing datatypes when loading or functions like REPLACE / TO_DATE in External tables ? Any idea? Any example code or SQL will great
Thank you so much!

Similar Messages

  • SQL *Loader and External Table

    Hi,
    Can anyone tell me the difference between SQL* Loader and External table?
    What are the conditions under we can use SQL * Loader and External Table.
    Thanx

    External tables are accessible from SQL, which generally simplifies life if the data files are physically located on the database server since you don't have to coordinate a call to an external SQL*Loader script with other PL/SQL processing. Under the covers, external tables are normally just invoking SQL*Loader.
    SQL*Loader is more appropriate if the data files are on a different server or if it is easier to call an executable rather than calling PL/SQL (i.e. if you have a batch file that runs on a server other than the database server that wants to FTP a data file from a FTP server and then load the data into Oracle).
    Justin

  • SQL Loader versus External Table

    If anyone has worked on external tables please let me know your views.

    user637544 wrote:
    for sqlldr i follow the following approach
    1. truncate table
    2. call sqlldr and load records in staging table
    3. check for bad records
    how do i tuncate, call external table and check bad records for external table.As part of the SQL*Loader control file you can tell it to truncate the table as part of the process before it loads in the data.
    The key differences between SQL*Loader and External Tables are:
    1. SQL*Loader is an external utility run from the o/s command line, whereas External tables are usable from within SQL and PL/SQL.
    2. SQL*Loader can only load data up into the database, whereas External tables can allow you to read files and write files (10g onwards)
    3. SQL*Loader has limited control on skipping rows etc. whereas External tables can be queried using SQL and has all the flexibility that SQL can offer.
    4. SQL*Loader requires connection information to the database, whereas External tables are already part of the database
    5. SQL*Loader can only change the source filename through dynamic o/s level scripts, whereas External tables can have the filename changed using an ALTER TABLE ... LOCATION ... command.
    If you want to truncate your staging table before loading it with data from the external table, then you will just have to do that as a seperate step, because the external table is not associated with other tables. Simply truncate the other table and then query the data from the external table into the staging table.
    External tables offer a lot more flexibility than using SQL*Loader.

  • Sql loader or external table

    Hi all good morning.
    can we write a stored procedure that loads a file into the table using sql loader?
    can Java call the above stored procedure?
    regards
    raj
    Edited by: user10887630 on Apr 23, 2009 6:18 AM

    Are you saying the files themselves can't be located on the server? or just that the process for loading the files can't be located on the server.
    If the files themselves cannot reside on the server then you won't be able to use SQL*Loader or External tables from within stored procedures. It would require some clever Java code type stuff to get across to a.n.other machine where the files are stored and get the data.
    Typically it is normal for such files to be located on the server. What reasons do the DBA's give for not wanting them there?
    DBA's say that application specific files cannot be maintained on the Database serverSo what are all the database data files then? They hold data from the applications. ;)

  • Sql loader utl_file & external table

    can any one let me know the differences between.
    1.sql loader
    2.utl_file
    3.external table
    Regards.
    Asif.

    To expand on Aron's answer....
    SQL*Loader - An operating system utility which uses control files (which you create) to load data files onto database tables.
    UTL_FILE - A database package which can be used for reading and writing files in any format you care to design programmatically.
    External Table - The latest thing which can be used instead of SQL*Loader. This is done from the database end, by creating a table as an external table and pointing it at the source file on the operating system. It also allows information similar to that put in the SQL*Loader control files to be specified against the table. By querying against the table you are in fact querying against the source file. There are some limitation compared to regular database tables such as there is no ability to write to the external table.
    ;)

  • SQL*Loader or external table for load a MSG (email) file

    Hi there!
    I'm looking for a way to load an email in a Oracle DB.
    I mean, not all the email's body in a column, but to "parse" it in a multi column/table fashion.
    Is it possible to do with a sql*loader script or an external table?
    I think it is not possible, and that I must switch to XML DB.
    Any idea?
    Thanks,
    Antonio

    Hello,
    Why don't you just load the entire MSG (email) as clob into one email_body column or whatever column name you want to use.
    To load data upto 32k, you can use varchar2(32656) but its not a good idea to load clob in that manner because it's very inconsistent as length can
    vary resulting in string literal too long. So you have 2 choices now, first you have to use either procedure or anonymous block to load clob data.
    First Method -- I loaded alert.log successfully and you can imagine how big this file can be (5MB in my test case)
    CREATE OR REPLACE DIRECTORY DIR AS '/mydirectory/logs';
    DECLARE
       clob_data   CLOB;
       clob_file   BFILE;
    BEGIN
       INSERT INTO t1clob
       VALUES (EMPTY_CLOB ())
       RETURNING clob_text INTO clob_data;
       clob_file   := BFILENAME ('DIR', 'wwalert_dss.log');
       DBMS_LOB.fileopen (clob_file);
       DBMS_LOB.loadfromfile (clob_data,
                              clob_file,
                              DBMS_LOB.getlength (clob_file)
       DBMS_LOB.fileclose (clob_file);
       COMMIT;
    END;Second Method: Use of Sqlldr
    Example of controlfile
    LOAD DATA
    INFILE alert.log "STR '|\n'"
    REPLACE INTO  table t1clob
       clob_text char(30000000)
    )Hope this helps

  • SQL loader  verses External table

    hi
    Can anybody guide me the advantages of External table over SQL Loader in data warehousing environment.
    Or and any URL where I can find suitabel knowledge.
    Thanks in advance.
    Moloy

    here it is.
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14215/et_concepts.htm#sthref1672

  • External Table which can handle appending multiple csv files dynamic

    I need an external table which can handle appending multiple csv files' values.
    But the problem I am having is : the number of csv files are not fixed.
    I can have between 2 to 6-7 files with the suffix as current_date. Lets say it will be like my_file1_aug_08_1.csv, my_file1_aug_08_2.csv, my_file1_aug_08_3.csv etc. and so on.
    I can do it by following as hardcoding if I know the number of files, but unfortunately the number is not fixed and need to something dynamically to inject with a wildcard search of file pattern.
    CREATE TABLE my_et_tbl
      my_field1 varchar2(4000),
      my_field2 varchar2(4000)
    ORGANIZATION EXTERNAL
      (  TYPE ORACLE_LOADER
         DEFAULT DIRECTORY my_et_dir
         ACCESS PARAMETERS
           ( RECORDS DELIMITED BY NEWLINE
            FIELDS TERMINATED BY ','
            MISSING FIELD VALUES ARE NULL  )
         LOCATION (UTL_DIR:'my_file2_5_aug_08.csv','my_file2_5_aug_08.csv')
    REJECT LIMIT UNLIMITED
    NOPARALLEL
    NOMONITORING;Please advice me with your ideas. thanks.
    Joshua..

    Well, you could do it dynamically by constructing location value:
    SQL> CREATE TABLE emp_load
      2      (
      3       employee_number      CHAR(5),
      4       employee_dob         CHAR(20),
      5       employee_last_name   CHAR(20),
      6       employee_first_name  CHAR(15),
      7       employee_middle_name CHAR(15),
      8       employee_hire_date   DATE
      9      )
    10    ORGANIZATION EXTERNAL
    11      (
    12       TYPE ORACLE_LOADER
    13       DEFAULT DIRECTORY tmp
    14       ACCESS PARAMETERS
    15         (
    16          RECORDS DELIMITED BY NEWLINE
    17          FIELDS (
    18                  employee_number      CHAR(2),
    19                  employee_dob         CHAR(20),
    20                  employee_last_name   CHAR(18),
    21                  employee_first_name  CHAR(11),
    22                  employee_middle_name CHAR(11),
    23                  employee_hire_date   CHAR(10) date_format DATE mask "mm/dd/yyyy"
    24                 )
    25         )
    26       LOCATION ('info*.dat')
    27      )
    28  /
    Table created.
    SQL> select * from emp_load;
    select * from emp_load
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    SQL> set serveroutput on
    SQL> declare
      2      v_exists      boolean;
      3      v_file_length number;
      4      v_blocksize   number;
      5      v_stmt        varchar2(1000) := 'alter table emp_load location(';
      6      i             number := 1;
      7  begin
      8      loop
      9        utl_file.fgetattr(
    10                          'TMP',
    11                          'info' || i || '.dat',
    12                          v_exists,
    13                          v_file_length,
    14                          v_blocksize
    15                         );
    16        exit when not v_exists;
    17        v_stmt := v_stmt || '''info' || i || '.dat'',';
    18        i := i + 1;
    19      end loop;
    20      v_stmt := rtrim(v_stmt,',') || ')';
    21      dbms_output.put_line(v_stmt);
    22      execute immediate v_stmt;
    23  end;
    24  /
    alter table emp_load location('info1.dat','info2.dat')
    PL/SQL procedure successfully completed.
    SQL> select * from emp_load;
    EMPLO EMPLOYEE_DOB         EMPLOYEE_LAST_NAME   EMPLOYEE_FIRST_ EMPLOYEE_MIDDLE
    EMPLOYEE_
    56    november, 15, 1980   baker                mary            alice     0
    01-SEP-04
    87    december, 20, 1970   roper                lisa            marie     0
    01-JAN-99
    SQL> SY.
    P.S. Keep in mind that changing location will affect all sessions referencing external table.

  • Creating SQL-Loader script for more than one table at a time

    Hi,
    I am using OMWB 2.0.2.0.0 with Oracle 8.1.7 and Sybase 11.9.
    It looks like I can create SQL-Loader scripts for all the tables
    or for one table at a time. If I want to create SQL-Loader
    scripts for 5-6 tables, I have to either create script for all
    the tables and then delete the unwanted tables or create the
    scripts for one table at a time and then merge them.
    Is there a simple way to create migration scripts for more than
    one but not all tables at a time?
    Thanks,
    Prashant Rane

    No there is no multi-select for creating SQL-Loader scripts.
    You can either create them separately or create them all and
    then discard the one you do not need.

  • SQL Loader - read 1st line to one table, rest of data to another

    Hi
    I looked around the FAQs and forums and find similar cases but not mine...
    I am running Oracle 9i and have a text file which has the 1st line as a control header and everything beneath it as data, something like this:
    14/07/2010|8
    12345678|0
    12345679|0
    12345680|10.87
    12345681|7655.8
    12345682|100
    12345683|0
    12345684|-90.44
    12345685|0
    The first (header) line has a date field and a counter (the number of records expected beneath it)
    The rest of the data is an account number and balance.
    Since SQL Loader is invoked outside of Oracle (Unix in my case) I assume I should create two tables, such as:
    Create table
    TIF_CURRENT_BALANCE_DTL
      ACCOUNT_REF_NO   VARCHAR2(30),  
      BALANCE_AMT      NUMBER(12,2)         
    Create table
    TIF_CURRENT_BALANCE_HDR
      HDR_DATE         DATE,  
      HDR_COUNT        NUMBER(10)
    );And use a control file which will load line 1 to TIF_CURRENT_BALANCE_HDR and other lines (SKIP=1) to TIF_CURRENT_BALANCE_DTL.
    Since the header/detail lines are not (necessarily) distinguishable, is there a way to achieve this, without modifying the input file in anyway?
    Thanks
    Martin

    Thanks for your reply - the solution should not be OS dependant as it will run on a Linux and UNIX installation.
    The DB will be (for now) Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
    I looked at that web page you provided and had some hope with the ROWS option, but this is the number of rows to load before each commit.
    Any other solutions?
    I know I could load it to a common table (text and number) and then convert the values accordingly in the PL/SQL procedure which will run afterwards, but I feel loading the data in the final format is going to be faster.
    I am considering using SQL Load to load records (SKIPping row 1) into the DTL table and within the PL.SQL loading the 1st record and performing validation. Since the file has approx 2million rows and is processed daily, 1.99999 million records read with SQL Loader and 1 with conventional methods will still be a vast improvement!
    Thanks

  • Error when loading from External Tables in OWB 11g

    Hi,
    I face a strange problem while loading data from flat file into the External Tables.
    ORA-12899: value too large for column EXPIRED (actual: 4, maximum: 1)
    error processing column EXPIRED in row 9680 for datafile <data file location>/filename.dat
    In a total of 9771 records nearly 70 records are rejected due to the above mentioned error. The column (EXPIRED) where the error being reported doesn't have value greater than 1 at all. I suspect it to be a different problem.
    Example: One such record that got rejected is as follows:
    C|234|Littérature commentée|*N*|2354|123
    highlightened in Bold is the EXPIRED Column.
    When I tried to insert this record into the External Table using UTL_FILE Utility it got loaded successfully. But when I try with the file already existing in the file directory it again fails with the above error, and I would like to mention that all the records which have been loaded are not Ok, please have a look at the DESCRIPTION Column which is highlightened. The original information in the data file looks like:
    C|325|*Revue Générale*|N|2445|132
    In the External Table the Description Value is replaced by the inverted '?' as follows:
    Reue G¿rale
    Please help.
    Thanks,
    JL.

    user1130292 wrote:
    Hi,
    I face a strange problem while loading data from flat file into the External Tables.
    ORA-12899: value too large for column EXPIRED (actual: 4, maximum: 1)
    error processing column EXPIRED in row 9680 for datafile <data file location>/filename.dat
    In a total of 9771 records nearly 70 records are rejected due to the above mentioned error. The column (EXPIRED) where the error being reported doesn't have value greater than 1 at all. I suspect it to be a different problem.
    Example: One such record that got rejected is as follows:
    C|234|Littérature commentée|*N*|2354|123
    highlightened in Bold is the EXPIRED Column.
    When I tried to insert this record into the External Table using UTL_FILE Utility it got loaded successfully. But when I try with the file already existing in the file directory it again fails with the above error, and I would like to mention that all the records which have been loaded are not Ok, please have a look at the DESCRIPTION Column which is highlightened. The original information in the data file looks like:
    C|325|*Revue Générale*|N|2445|132
    In the External Table the Description Value is replaced by the inverted '?' as follows:
    Reue G¿rale
    Please help.
    Thanks,
    JL.sorry, couldnt see the highlighted test.could you plesae enclsoe it in  tags
    also post the table definition with attributes. BTW..Whats your NLS_LANGUAGE SET TO?

  • SQL LOADER USING EXTRNAL TABLE

    I have .csv file having around 70k records
    in which fields are delimited by tab and
    enclosed in double quotes but double quotes may be part of data.
    and records are delimited by newline.
    After creating external table when I issue SELECT statment
    select count(*) from proTxt ;
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04020: found record longer than buffer size supported, 524288, in C:\Program Files\Apache Software Foundation\Tomcat
    5.5\webapps\tmTest\upload\product\Data\output09_1.txt
    ORA-06512: at "SYS.ORACLE_LOADER", line 19
    Following is the create table statement:
    CREATE TABLE proTxt (PRO_CODE VARCHAR2(30),
    PRO_DESC VARCHAR2(500),
    PUR_PRICE VARCHAR2(20),
    SALE_PRICE VARCHAR2(20)
    ORGANIZATION EXTERNAL
    TYPE ORACLE_LOADER
    DEFAULT DIRECTORY DAT_DIR
    ACCESS PARAMETERS
    records delimited by NEWLINE SKIP 1
    badfile BAD_DIR:'proTxt%a_%p.bad'
    logfile LOG_DIR:'proTxt%a_%p.log'
    fields terminated by X'9' OPTIONALLY ENCLOSED BY '"' AND '"'
    missing field values are null
    ( PRO_CODE,
    PRO_DESC,
    PUR_PRICE,
    SALE_PRICE
    LOCATION ('output09_1.txt')
    PARALLEL 4
    REJECT LIMIT UNLIMITED;
    record size is not large.
    Log file :
    LOG file opened at 12/05/12 20:25:40
    KUP-04020: found record longer than buffer size supported, 524288, in C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\tmTest\upload\product\Data\output09_1.txt
    KUP-04053: record number 2
    data file
    PRO_CODE     PRO_DESC     PUR_PRICE     SALE_PRICE
    "0000336658"     "BEARING"     "Rs.0.00"     "Rs.0.00"
    "0000790028"     "SEAL"     "Rs.76.00"     "Rs.90.00"
    "0000790118"     "SPRING"     "Rs.24.00"     "Rs.28.00"
    "0000792284"     "F.BRK.CAL.W/O PA"     "Rs.2,627.00"     "Rs.3,100.00"
    "0000792285"     "F.BRK.CAL.W/O PA"     "Rs.2,627.00"     "Rs.3,100.00"
    "0005896322"     "PISTON, RING"     "Rs.5,000.00"     "Rs.5,900.00"
    "0005896323"     "PISTONS, RINGS AND P"     "Rs.17,755.00"     "Rs.20,951.00"
    "0005896559"     "PISTON, RINGS AND PI"     "Rs.5,000.00"     "Rs.5,900.00"

    Hi,
    when i used
    records delimited by *'\r'*
    then 4226 record written to table
    but enclosed charcter double quotes["] were also written and
    there is some space between charcters
    " 0 0 0 0 3 3 6 6 5 8 " " B E A R I N G " " R s . 0 . 0 0 " " R s . 0 . 0 0 "
    " 0 0 0 0 8 5 6 7 0 7 " " P L U G " " R s . 0 . 0 0 " " R s . 0 . 0 0 "
    Definitely this is "External Table with Flatfile Moved Across Platforms" issue.
    when I opened .csv file in excel and saved as tab delimited it works fine.
    But I do not know plateform of data file.
    How to know the CHARACTERSET of data file
    Log file
    Field Definitions for table PROTXT
    Record format DELIMITED, delimited by
    Data in file has same endianness as the platform
    Rows with all null fields are accepted
    Fields in Data Source:
    PRO_CODE CHAR (255)
    Terminated by "9"
    Enclosed by """ and """
    Trim whitespace same as SQL Loader
    PRO_DESC CHAR (255)
    Terminated by "9"
    Enclosed by """ and """
    Trim whitespace same as SQL Loader
    PUR_PRICE CHAR (255)
    Terminated by "9"
    Enclosed by """ and """
    Trim whitespace same as SQL Loader
    SALE_PRICE CHAR (255)
    Terminated by "9"
    Enclosed by """ and """
    Trim whitespace same as SQL Loader

  • How two link two extern tables in one in BW ?

    Hello everybody,
    I have 2 extern tables with few data (6000):
    ZETL_NEGO:
    Number/AIRPORT/DATEFROM/DATETO/AMOUNT_NF
    10;CDG;10/02/08;20/05/08;100
    ZETL_PRICE:
    AIRPORT/FARE_PUBLIC
    CDG;400
    I wanted to load these 2 tables in BW.
    And i want obtain the following result:
    10;CDG;10/02/08;20/05/08;100;400
    and not these 2 lines:
    10;CDG;10/02/08;20/05/08;100;0
       ;        ;            ;             ;     ;400
    I want join these two tables ...
    - I create an ODS specific to load ZETL_NEGO with
    KeyField=Number/AIRPORT/DATEFROM/DATETO
    - I create an other ODS specific to load ZETL_PRICE with
    KeyField=AIRPORT
    - Then, i create a third ODS which load the two precedent with
    KeyField=Number/AIRPORT/DATEFROM/DATETO
    but, yes, it doesn't work.
    These 2 tables are not join ...
    Could you give me suggestions how do this?
    Thanks in advance.
    Best Regards,
    Rod.

    Yes that way is not going to work, but when you are loading data from the first DSO, do a lookup to the second DSO with AIRPORT number. The only drawback with this is if you load the first DSO before the Second DSO, you will be losing some data and also  you might have some issue if you are doing delta load. This will work fine with full loads.
    Another option is leave the dso or create cube for each dso and create a multiprovider, and create a report off the multiprovider and when you create a report, you can use the option of 'Constant Selection' to make the report come in one line.
    And final option is to create infoset of the two DSO'es which will create one records.
    thanks.
    Wond

  • SQL Loader AND Temporary Tables

    Hi :
    Have a Couple of Questions..
    (1) Is SQL Loader not part of the ORACLE DB 9.X?? Coz I could not find that exe.
    (2) Can we have the Data file on the Client Machine?? OR is it mandatory that the data file should be on the Server to load the data?

    SQL loader is part of Oracle9i and you can use its driver to create external table.Moreover for external tables datafiles should be on server.

  • Sql loader master detail tables

    Hi
    I am trying to load master detail tables using sql loader. I have a sequence in the master table as primary key and have to load primary key in detail table. is there any way i can query up the primary key by name in the control file. please whats the best way to do this.
    can i query up the primary key in the master table by the name in detail table which is jan09.
    e.g
    master data
    jan09,description
    detail data
    jan09,'test1','100,'y'
    LOAD DATA
    INFILE 'test.data'
    insert
    INTO TABLE master_table
    fields terminated by ',' optionally enclosed by '"' trailing nullcols
    (id position(1:2) "myseq.nextval",
    code char,
    creation_date date sysdate,
    last_update_date date sysdate,
    into TABLE BDETAILS
    fields terminated by ',' optionally enclosed by '"' trailing nullcols
    (id number "select id from master_table where code=" || :code
    name char,
    amt decimal,
    flag char
    )

    Hey Here is what you need.
    You will have to understand and test this properly.
    It took me quiet some time before i could get to this stage
    Here is the test data with all the commands.
    As far the ID in the detail table is concerned you have no option but to update that column once the loading is complete.
    1) create Table
    CREATE TABLE master_table(ID NUMBER,code VARCHAR2(50),creation DATE,last_update DATE);
    CREATE TABLE bdetails(ID NUMBER,NAME VARCHAR2(100),amt NUMBER,flag VARCHAR2(10));
    ALTER TABLE master_table ADD (chc VARCHAR2(10));2) Create Sequence
    CREATE SEQUENCE testseq INCREMENT BY 1;3) CTL FILE
    LOAD DATA
    INFILE 'c:\sqlldr\test.txt'  /*path of data file */
    append
    INTO TABLE master_table
    when (1) ='M'  /*to check if the record in the data file is a master record */
    fields terminated by ',' optionally enclosed by '"' trailing nullcols
    (id  expression "testseq.nextval", /*select next value from sequence */
    mcol1 filler, /*FILLER keyword is sused to skip first column from data file */
    chc,
    code  ,
    creation "sysdate",
    last_update "sysdate"
    Into TABLE BDETAILS
    when (1) ='D'  /*to check if the record in the data file is a Detail record */
    fields terminated by ',' optionally enclosed by '"' trailing nullcols
    (id  expression "testseq.currval", /* UNFORTUNATELY THIS PICKS UP THE LAST ID OF THE MASTER RECORD SESSION STUFF GOING ON HERE*/
    col1 filler position(1:2),  /* specifying this POSITION(1:2) is very very important as you need to reset the cursor to start of the line for the next record */
    name  ,
    amt ,
    flag )4) SQLLDR Command
    sqlldr scott/tiger data=c:\sqlldr\test.txt control=c:\sqlldr\1.ctl
    5) data file
    M,jan09,description
    D,test1,100,y
    M,feb09,description1
    D,test2,200,x
    M,mar09,description2
    D,test3,200,xHope this helps you and give you a lead how to proceed.
    Cheers!!!
    Bhushan

Maybe you are looking for

  • Random Kernel Panic after upgrade to kernel 2.6.36

    Hello, First of all, I apologise if this topic has already come up on the forums, but i've checked and can't see anything specifically relating to the problem im having, and ive also checked the bugs section of Archwiki and can't seem to see anything

  • Automatic creation of Service Arrangements in SAP CRM 2007

    Dear all we're using SAP CRM Resource Planning with HCM integration, so get the Employee Master and requried Availability Info Types replicated from HCM via ALE. Unfortunately, between the creation of an Employee and the Time Distribution, a Service

  • Playing SWF and corresponding FLV on standalone computer

    I have nice results encoding AVI's with Flash CS3 Video Encoder, and making SWF with embedded chapters, in Action Script 3 with Flash CS3 Professional. I put these SWF's and FLV's on DVD; they are nicely played on my computer, in the Adobe Flash Play

  • Why can't airdrop work between mac os and ios7!!!!

    why oh why

  • Sarfai wont run - help plz

    I read through the forums but nothing seems to work. I seem to have got a issue as safari wont open. It was safari 5 something (new) as I updated software. Read the forums and so I reinstalled Lion again and went with the 10.7.5 update. - Still refus