DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: How to import excel sheet data in oracle DB useing SQL*LOADER

  1. #1
    Join Date
    Apr 2008
    Posts
    26

    How to import excel sheet data in oracle DB useing SQL*LOADER

    Dear all,

    I'm useing oracle 9i n i wnt to import my excel sheet data in datbase using SQL*LOADER.

    How to create the control and how can i proceed wiht that .
    Plz let me Know the procedure.

    Thanks

  2. #2
    Join Date
    Aug 2007
    Location
    Cyberjaya,kuala lumpur
    Posts
    340
    1. Get the excel Sheet .

    2. Save it in ?file_name. CSV? format.

    3. Make a copy from this CSV file and rename it to a ? File_name.txt? format.

    4. Create a table in the Oracle database that its columns map the fields of the Excel sheet.

    5. Create a control file that read the data from the file generated from step 3 and put the data in the oracle Table generated in step 4.

    6. From the command prompt, run the SQL Loader that run the CTL file and perform the task of copying the data from the Excel into Oracle.

    C:\sqlldr username/password file.ctl path

    E.g.: c:\sqlldr bplus/bplus c:\xyz.ctl

    -----

    here is the content of the control file
    the controlfile contas the strucur of the table.

    LOAD DATA
    INFILE "C:\sqlldr\hano_gard\HANO1.txt"
    INTO TABLE table_name

    FIELDS TERMINATED BY ';'

  3. #3
    Join Date
    Apr 2001
    Location
    Vadodara, India
    Posts
    249
    As you are using Oracle 9i, use External Table.

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