Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

External table delimited by tab

218677Oct 21 2004 — edited Oct 25 2004
Hello,

I have problems with tab separated fields and null values. My file is:

fieldA<TAB>fieldB<TAB>fieldC<TAB>fieldD
field1<TAB><TAB><TAB>field4

The external table should return:

fieldA fieldB fieldC fieldD
field1 null null field4

But it returns:

fieldA fieldB fieldC fieldD
field1 field4 null null

The external table script is:

CREATE TABLE LDT_TEST
(
C1 VARCHAR2(50),
C2 VARCHAR2(50),
C3 VARCHAR2(50),
C4 VARCHAR2(50)
)
ORGANIZATION EXTERNAL
( TYPE ORACLE_LOADER
DEFAULT DIRECTORY LOC_DDS_LOC_FILE_NET_SOURCE
ACCESS PARAMETERS
( RECORDS DELIMITED BY NEWLINE
CHARACTERSET WE8MSWIN1252
STRING SIZES ARE IN BYTES
NOBADFILE
NODISCARDFILE
LOGFILE LOC_DDS_LOC_FILE_NET_LOG:'prueba.log'
FIELDS
TERMINATED BY 0x'09'
OPTIONALLY ENCLOSED BY '"' AND '"'
LRTRIM
MISSING FIELD VALUES ARE NULL
(
"C1" ,
"C2" ,
"C3" ,
"C4"
)
)
LOCATION (LOC_DDS_LOC_FILE_NET_SOURCE:'prueba')
)
REJECT LIMIT UNLIMITED
NOLOGGING
NOCACHE
NOPARALLEL;


Any idea?

Thanks in advance

Laura



Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 22 2004
Added on Oct 21 2004
3 comments
259 views