external tables against tab delimeted file [message #73027] |
Mon, 19 January 2004 08:05 |
kshathrya
Messages: 29 Registered: October 2001
|
Junior Member |
|
|
hi guys, i have a weird issue.
i am trying to create an external table againsta tab delimited file. if i use X'09' if doesnt work. so i try putting literal tab inside ' '. in one case it kind aworked. but when i tried with anothe rfile it fails. please advice, as to what should be used for
fields terminated by ' ' in case of external tables against tab delimited files.
ext table:
create table file_tab_ext
(id1 varchar2(20),
p1 varchar2(30),
r1 varchar2(10),
r1_min varchar2(10),
r1_max varchar2(10),
begin_date varchar2(20),
end_date varchar2(20),
id2 varchar2(10),
filler varchar2(10))
organization external
(
type oracle_loader
default directory ext_tables
access parameters
(
records delimited by newline
badfile 'file_tab.bad'
logfile 'file_tab.log'
fields terminated by ' '
missing field values are null
)
location ('file_tab.txt')
)
reject limit unlimited
nologging;
|
|
|
|
Re: external tables against tab delimeted file [message #131865 is a reply to message #73453] |
Tue, 09 August 2005 18:18 |
damienlynch
Messages: 3 Registered: August 2005 Location: Canberra, Australia
|
Junior Member |
|
|
I have an external table delimited by tabs. If there are any null fields in the external file (two or more tabs together), these fields are being ignored. Does anyone know a way around this? This only happens with tab delimiters. If I convert the tabs to commas (or anything else) the file loads properly.
|
|
|
|
Re: external tables against tab delimeted file [message #132104 is a reply to message #132074] |
Wed, 10 August 2005 18:46 |
damienlynch
Messages: 3 Registered: August 2005 Location: Canberra, Australia
|
Junior Member |
|
|
Thanks Mahesh. I'm already using 0x'09' as a delimiter. I also have text fields optionally enclosed by double quotes and I think this is causing the problem. Oracle is searching for the quotes and skips over the tabs which it considers as whitespace. I've resorted to reading in the quotes as part of the text fields then deleting them when I load the real tables. This is slower but it works. Thanks for your help anyway.
|
|
|