The file, info.dat, created with data identified above.
Set-up a default directory (which contains the data source) and to grant access to it (need the CREATE ANY DIRECTORY privilege):
CREATE DIRECTORY ext_tab_dir AS '/usr/apps/datafiles';
GRANT READ ON DIRECTORY ext_tab_dir TO SCHEMA_OWNER;
Create an external table named newtable_load:
CREATE TABLE newtable_load (ACCOUNTNBR NUMBER ) ORGANIZATION EXTERNAL (TYPE ORACLE_LOADER DEFAULT DIRECTORY default_directory ACCESS PARAMETERS (RECORDS DELIMITED BY NEWLINE FIELDS (ACCOUNTNBR NUMBER) ) LOCATION ('info.dat') );
Load data from the external table newtable_load into the table newtable:
INSERT INTO newtable (ACCOUNTNBR) (SELECT ACCOUNTNBR FROM newtable_load);