Home » RDBMS Server » Server Utilities » external tables against tab delimeted file
external tables against tab delimeted file [message #73027] Mon, 19 January 2004 08:05 Go to next message
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 #73453 is a reply to message #73027] Tue, 04 May 2004 05:45 Go to previous messageGo to next message
Prashanth Radhanath
Messages: 1
Registered: May 2004
Junior Member
This should work :

fields terminated by 0x'09'
Re: external tables against tab delimeted file [message #131865 is a reply to message #73453] Tue, 09 August 2005 18:18 Go to previous messageGo to next message
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 #132074 is a reply to message #131865] Wed, 10 August 2005 13:31 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>>fields terminated by 0x'09'
should work.
Re: external tables against tab delimeted file [message #132104 is a reply to message #132074] Wed, 10 August 2005 18:46 Go to previous message
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.
Previous Topic: imp-00010 error
Next Topic: Urgent help in SQL* Loader please
Goto Forum:
  


Current Time: Thu Jul 04 05:44:31 CDT 2024