5 Replies Latest reply: May 2, 2013 10:23 AM by sb92075 RSS

    SQL LOADER- Multiple files load into multiple tables

    user590978
      Hi, Hope all the gurus are doing great!..

      I have to load multiple files into multiple tables with the help of sql loader using one control file.

      I come to know we can use WHEN condition in the control file and do it. but my files are totally different and not position files.

      Here is the example of two files.:
      1.
      
      
      create table GW2CS_history_ext
      (RR_ID     number(4)
      ,BBIBER_ID     varchar2(30)
      ,Y_DATE     varchar2(10)
      ,TTIVE_DATE     varchar2(10)
      ,RESS_S     varchar2(10)
      ,ADSS_T     varchar2(10)
      ,SEET1     varchar2(100)
      ,CTY      varchar2(100)
      ,STEE     varchar2(2)
      ,ZZP     varchar2(100)
      ,H_PNE     varchar2(12)
      ,WO_PHE     varchar2(12)
      ,STTTRE2     varchar2(100)
      ,FXX     varchar2(12)
      ,EILE     varchar2(100)
      ,EXTID     number(4)
      ) 
      
      
      
      "42948","1164900","","01/01/2012","A","R","1201   FORT  ST","LINCOLN PARK","MI","48146","313-282-6158","","APT 407",""," ","42948"
      "42950","1142700","","01/01/2013","B","M","22305  KING  RD","WOODHAVEN","MI","48183","",""," ","","","42950"
      "42955","7928600","","01/01/2013","A","R","15753  INDIANA","DETROIT","MI","48238-1103","313-862-2581",""," ",""," ","42955"
      "42958","7773900","","01/01/2013","B","M","14581  PRAIRIE","DETROIT","MI","48238-1912","",""," ","","","42958"
      "42959","7674700","","01/01/2013","A","R","3223 DARTMOUTH","DETROIT","MI","48217","313-629-5380",""," ",""," ","42959"
      "42963","7633700","","01/01/2013","B","M","2645 RIVERSIDE DR","TRENTON","MI","48183","","","APT 304","","","42963"
      "42964","7632200","","01/01/2013","B","M","5881   FLORIDA","DETROIT","MI","48210-1932","",""," ","","","42964"
      "42968","39295900","","01/01/2013","B","M","9363 STOUT","DETROIT","MI","48228","",""," ","","","42968"
      "42970","39171900","","01/01/2013","A","R","9910 BRADY ST","REDFORD","MI","48239","313-743-2807",""," ",""," ","42970"
      
      2.
      
      
      create table GW2CS_ext
      (BER_ID     number(4)
      ,IBER_ID     varchar2(20)
      ,TIVE_DATE     varchar2(10)
      ,ID_1     varchar2(100)
      ,ID_2     varchar2(100)
      ,CODE_1     varchar2(100)
      ,CODE_2     varchar2(100)
      ,CODE_TYPE     varchar2(100)
      ) 
      
      
      "42984","7148500","01/01/2011","0",,"","",""
      "43106","0625800","10/01/2009","0",,"","",""
      "43107","0625900","10/01/2009","0",,"","",""
      "43111","9681700","10/01/2009","0",,"","",""
      "43129","357100","07/01/2010","0",,"","",""
      "43133","5370800","10/01/2009","0",,"","",""
      "43138","9785000","10/01/2009","0",,"","",""
      "43493","1266100","01/01/2011","0",,"","",""
      "43559","2631600","01/01/2013","0",,"","",""
      "43717","3122900","01/01/2011","0",,"","",""
      "43740","3208400","07/01/2012","0",,"","",""
      "43749","3562600","02/01/2012","0",,"","",""
      "43771","3796800","01/01/2013","0",,"","",""
      "43777","3900500","11/01/2012","0",,"","",""
      "43830","2732200","01/01/2013","0",,"","",""
      "43889","3462500","01/01/2012","0",,"","",""
      "43900","2744000","01/01/2013","0",,"","",""
      "44039","8468700","06/01/2012","0",,"","",""
      "44192","9040100","01/01/2011","0",,"","",""
      "44203","0848900","01/01/2011","0",,"","",""
      "44251","0072200","02/01/2012","0",,"","",""
      "44280","9535100","01/01/2011","0",,"","",""
      "44284","9483300","01/01/2011","0",,"","",""
      "44290","9389400","01/01/2011","0",,"","",""
      Can you please let me know how i can load this files from one control files. same way i have 18 files and 18 different tables.

      Thanks in advance!

      Appreciated for the help