2 Replies Latest reply: Nov 14, 2012 3:50 AM by 971895 RSS

    Load data from File

    893566
      Hi

      I get new csv files every day loaded to a location. I am trying to write a SQL loader script to read those file on a daily basis and load the data to a table. How can I write the code for this to check the new files that are found in a location and read them from sqlloader

      thanks
        • 1. Re: Load data from File
          L-MachineGun
          890563 wrote:
          Hi

          I get new csv files every day loaded to a location. I am trying to write a SQL loader script to read those file on a daily basis and load the data to a table. How can I write the code for this to check the new files that are found in a location and read them from sqlloader

          thanks
          1) If these files have all the same format, create an external table .
          2) Have a OS script that detects which are the latest files and insert the names into a temp table
          3) Query the name(s) from temp table and "alter" the location in the external table
          4) Load the data from external table into the real table.
          5) Remove the file name from the temp table.
          :p
          • 2. Re: Load data from File
            971895
            can you provide the Filenameing convention.Dialy how it is creating which name?
            it is easy way to load the external data into table using external table..