Database Utilities (MOSC)

MOSC Banner

external tables with tab-delimited columns

edited Feb 20, 2020 12:30PM in Database Utilities (MOSC) 6 commentsAnswered
when loading data via an external table from a file with tab-delimited fields Oracle interprets two subsequent tabs incorrectly as one.

The followin definition works fine as long as there is a value in every field.

CREATE TABLE ext_testtab
(firsttestfield CHAR(255),
scdtestfield CHAR(255),
thrdtestfield CHAR(255))
ORGANIZATION EXTERNAL (
TYPE oracle_loader DEFAULT DIRECTORY Test_Export_dir
ACCESS PARAMETERS
(RECORDS DELIMITED BY ''
skip 1
BADFILE bad_file_dir: 'Test.bad'
LOGFILE log_file_dir: 'Test.log'
NODISCARDFILE
FIELDS TERMINATED BY '\t' OPTIONALLY ENCLOSED BY '"'
MISSING FIELD VALUES ARE NULL
)
LOCATION (
Test_Export_dir:Testfile.txt'
)
)
REJECT LIMIT 0
NOPARALLEL

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center