load multiple csv into one table by SQLLDR

前端 未结 5 1847
闹比i
闹比i 2021-01-05 03:36

I am using SQL LOADER to load multiple csv file in one table. The process I found is very easy like

LOAD
  DATA 
  INFILE \'/path/file1.csv\'
  INFILE \'/pat         


        
5条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-05 04:10

    Loop over the files from the shell:

    #!/bin/bash
    for csvFile in `ls file*.csv`
    do
        ln -s $csvFile tmpFile.csv
        sqlldr control=file_pointing_at_tmpFile.ctl
        rm tmpFile.csv
    done
    

提交回复
热议问题