-1

How to insert data from multiple files having different columns into a table in Oracle database using SQL Loader with Single control file.

Basically ,

We have 3 CSV files

  1. file 1 having columns a,b,c
  2. file 2 having columns d,e,f
  3. file 3 having columns g,h,i

We need to insert the above attributes to a Table named "TableTest" having columns a,b,c ,d,e,f,g,h,i

Using single control file

Thanks in advance

harun prasu
  • 95
  • 3
  • 17
  • Check this out - [Link Fixed](http://www.orafaq.com/wiki/SQL*Loader_FAQ#Can_one_load_data_from_multiple_files.2F_into_multiple_tables_at_once.3F) – ruudvan May 02 '16 at 18:06
  • 1
    Even if you could I would advise against it as there is no way to guarantee data integrity. At a minimum each row in each file needs a key that is unique across all three files in order to build the row. You will need a procedure to read these files, using that key to ensure you indeed matched up all components of that row before inserting into the table. – Gary_W May 04 '16 at 15:02

1 Answers1

1

You really can't. You can either splice the .csv files together (a lot of nasty work) or create 3 tables to load and then use plsql or sql to join them together into your target table.

T Gray
  • 712
  • 4
  • 10