external table - issue (very urgent) [message #52891] |
Mon, 19 August 2002 07:33 |
kshathrya
Messages: 29 Registered: October 2001
|
Junior Member |
|
|
I get the follwoiung when i try to do a select:
The following error has occurred:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-00554: error encountered while parsing input commands
KUP-01005: syntax error: found "minussign": expecting one of: "badfile, characterset, data, delimited, discardfile, exit, fields, fixed, load, logfile, nodiscardfile, nobadfile, nologfile, processing, string, skip, variable"
KUP-01007: at line 2 column 3
ORA-06512: at "SYS.ORACLE_LOADER", line 14
ORA-06512: at line 1
external table create statement:
CREATE TABLE emp_external (
empid number(5),
empname varchar2(10)
)
ORGANIZATION EXTERNAL
(TYPE oracle_loader
DEFAULT DIRECTORY direct
ACCESS PARAMETERS
(
RECORDS DELIMITED BY newline
--BADFILE 'ulcase1.bad'
-- DISCARDFILE 'ulcase1.dis'
-- LOGFILE 'ulcase1.log'
-- SKIP 20
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
(
empid,
empname
)
)
LOCATION ('emp_external.csv')
)
REJECT LIMIT UNLIMITED;
i have created the directory and have given permission too. please advice. in addition, if i need to use tab seperated as the format instead of comma delimeted what do i do?
|
|
|
Re: external table - issue (very urgent) [message #52914 is a reply to message #52891] |
Tue, 20 August 2002 08:04 |
Trifon Anguelov
Messages: 514 Registered: June 2002
|
Senior Member |
|
|
"--BADFILE 'ulcase1.bad'
-- DISCARDFILE 'ulcase1.dis'
-- LOGFILE 'ulcase1.log'
-- SKIP 20"
Why do you have those "--" infront? There is no such syntax like that. Remove them and try again.
If you want to use TAB delimiter do like that:
LOAD DATA
INFILE *
BADFILE 'd:stageloaderload.bad'
DISCARDFILE 'd:stageloaderload.dsc'
APPEND
INTO TABLE TEST
FIELDS TERMINATED BY "{TAB}" TRAILING NULLCOLS
(
c1,
c2 char,
c3 date(8) "DD-MM-YY"
)
BEGINDATA
1{TAB}X{TAB}25-12-00
2{TAB}Y{TAB}31-12-00
The <tab> placeholder is only for illustration purposes, in the acutal implementation, one would use a real tab character which is not visible. Currly brases are just to point the TAB character, don't type them
Hope that helps,
clio_usa
OCP - DBA
Visit our Web site
|
|
|