Q : SQL*Loader : Loading on a condition
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Q : SQL*Loader : Loading on a condition

  1. #1
    Join Date
    Aug 2004
    Posts
    1

    Q : SQL*Loader : Loading on a condition

    Hi,

    Appreciate if someone can give me some directions on this.

    I get data-files which has a particular identified on the 1st record( header ), based on which I've to load a constant for the 1st column of every row. How do I set in the control file.

    Example :-

    data_file_1
    O|08-aug-04|1000 -- format( company_id|date|row_count )
    john saylor|100|10000 --format( name|emp_id|salary )
    larry ellisson|1|10000000 --format( name|emp_id|salary )
    ...
    ...
    ... -- 1000 such records

    data_file_2
    S|08-aug-04|10
    scott mcnealy|1|1000000
    john schwartz|2|1000000
    ...
    ...
    --10 such records

    The table I want to load these 2, have these columns

    Table A
    Company_name
    Emp_name
    Emp_id
    Run_date ( default to sysdate )

    Now, all data-files will have only one identifier-record and in the 1st row. So in these examples, I've to set a constant as Oracle or Sun Microsystems based on the 1st record( header ) for every row inserted from that data-file. I need to embed all these in a single control-file to load data-files for different companies.

    Thanks.
    - Shankar.

  2. #2
    Join Date
    Oct 2002
    Posts
    182
    are you saying you need to look at the
    first row, load that company_id for every row
    beneath that one?
    - Cookies

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width