Results 1 to 4 of 4

Thread: SQl*loader

  1. #1
    Join Date
    Oct 2003
    Location
    Mumbai,India.
    Posts
    36

    Unanswered: SQl*loader

    Hi All,
    Is it possible to load multiple values(stored in a CSV file) on specific column of single row (oracle table) thru' sql*loader?
    i.e:
    My datas on csv file looks like,

    sno-----sname-----Relation----- Rname

    1 ----- Alex ----- Father ----- Joseph.
    2 ----- Peter ----- Father ----- Ambrose
    ----- ----- ----- Mother ----- Diana
    ----- ----- ----- Brother ----- D'Fransis
    3 ----- Mr. X ----- Father ----- Joseph.

    Now,i've to load this into oracle table t1.
    Table format is,

    sno ----- number ----- Not Null
    sname ----- varchar2(15) ----- Null
    relation ----- varchar2(7) ----- Null
    rname ----- varchar2(15) ----- Null

    Please help me to resolve this problem.
    Thanks for your time.

  2. #2
    Join Date
    Jul 2003
    Posts
    2,296
    the CSV file is obviously seperated by commas, not by '-----' right?

    you want the data loaded into 1 column?
    doesn't make much sense ...

    oracle table would look like?:
    1
    Alex
    Father
    Joseph.
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  3. #3
    Join Date
    Oct 2003
    Location
    Mumbai,India.
    Posts
    36
    hi,
    Thanks for your reply.
    ya,csv file is seperated by commas only.
    So,u r saying that,it is not possible to get Oracle table like this using Sql*loader,

    sno-----sname-----Relation----- Rname

    -1--------Alex-----Father----- Joseph.
    -2--------Peter----Father------Ambrose
    -------------------Mother------Diana
    -------------------Brother------D'Fransis
    -3--------Mr. X----Father------Joseph.

    (Friends ,here i've inserted '----' for allignment purposes(just equal to blanks) to reveal the exact table&data format .)

    Is it possible to write any Triggers to achieve this?
    Help me Please.
    Thanks for your time.
    yours,
    Sharma.S.

  4. #4
    Join Date
    Oct 2003
    Posts
    26
    Control file

    Load data
    infile <Give I/P file Name Here>
    insert
    into table <table name>
    fields terminated by "," trailing nullcols
    (
    sno integer external,
    sname char,
    relation char,
    rname char
    )


    Invoke sqlldr from command line

    sqlldr control-<Ctl file name> data=<Data file name> log=<Log file Name>

    HTH
    Arvind

Posting Permissions

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