external table [message #602958] |
Tue, 10 December 2013 10:05 |
|
karthik7narla
Messages: 9 Registered: December 2013 Location: hyderabad
|
Junior Member |
|
|
hi every one
this is what the external table i have created
CREATE TABLE external_karthik (
DEALER_CODE number(30),
TARGET_OR_COMM VARCHAR2(50)
)
ORGANIZATION EXTERNAL (
TYPE ORACLE_LOADER
DEFAULT DIRECTORY usage_data
ACCESS PARAMETERS (
RECORDS DELIMITED BY NEWLINE
FIELDS TERMINATED BY ','
MISSING FIELD VALUES ARE NULL
(
DEALER_CODE number(30),
TARGET_OR_COMM VARCHAR2(50)
)
)
LOCATION ('Green_Outlet_MNP.txt')
)
table is created successfully but when i am trying to retrive using select statement
select * from external_karthik
it is throwing the following error ..
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-00554: error encountered while parsing access parameters
KUP-01005: syntax error: found "identifier": expecting one of: "binary_double, binary_float, comma, char, date, defaultif, decimal, double, float, integer, (, nullif, oracle_date, oracle_number, position, raw, recnum, ), unsigned, varrawc, varchar, varraw, varcharc, zoned"
KUP-01008: the bad identifier was: number
KUP-01007: at line 5 column 24
ORA-06512: at "S
can any one help me out of this ..
|
|
|
|
|
|
|
Re: external table [message #603045 is a reply to message #603013] |
Wed, 11 December 2013 03:17 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
karthik7narla wrote on Wed, 11 December 2013 11:46but when i viewed the file in VI editor .
the file is appended with ^M . i dont understand how this ^M is comming .
10031742,75^M
10031747,75^M
10031755,75^M
10031757,75^M
This is why I asked you to mention the OS.
In UNIX, you can do type this in VI editor to remove all ^M characters :
Different OS will interpret the end-of-line differently. That's the reason you got this ^M from Windows to UNIX. Just type the command manually and get rid of all the ^M characters. You should be able to process the file. Even dos2unix is a good option.
|
|
|
|
|