Search code examples
oracleplsqlexternal-tables

can multiple csv's can be read using external table in oracle without specifying list of file names?


I have 150 odd csv files but there file name may vary. so i want to know whether in external table concept can we use *.csv where we provide file name list.

LOCATION (*.csv)


Solution

  • According to this article, you can do it from 12c Release 1 (not tested):

    A number of minor usability improvements have been made to the ORACLE_LOADER access driver to make external table creation simpler. The LOCATION clause now accepts wildcards. An "*" matches multiple characters, while a "?" matches a single character.

    LOCATION ('emp_ext*.dmp')
    
    LOCATION ('emp_ext?.dmp')