Maybe it's me getting confused.
Your data source definition is as follows
JAN CHAR (255)
Terminated by ","
Trim whitespace same as SQL Loader
FEB CHAR (255)
Terminated by ","
Trim whitespace same as SQL Loader
MAR CHAR (255)
Terminated by ","
Trim whitespace same as SQL Loader .
I'm seeing 255 here and assuming that's what you require. I could have the
wrong end of the stick
M.
-----Original Message-----
From: pauline
[mailto:oracledba-ezmlmshield-x81644388.[Email address protected]
Sent: 08 January 2008 13:04
To: LazyDBA Discussion
Subject: RE: export schema
Now you guys are really confusing me.
Let me get this right.
When my souce table specifies 4 bytes, and my destination table specifies
4bytes, the external table has to be 255bytes as per the error I had
previously posted?
Will that not affect my destination table during the "insert from select".
Will that also not moarn about the characters?
Pauline
oracledba-ezmlmsh
ield-x10202660.x1
[Email Address Removed] To
.com [Email address protected]
cc
2008/01/08 02:43
PM Subject
RE: export schema
But you specifically defined your external table with 4 byte 10 byte etc.
This should be 255 (looking at your data source definition).
-----Original Message-----
From: pauline
[mailto:oracledba-ezmlmshield-x26054606.[Email address protected]
Sent: 08 January 2008 12:09
To: LazyDBA Discussion
Subject: RE: export schema
Thanks guys, but increasing the size does not answer my question. The table
that produces the flat file, has the same structure as the one importing
the data. This means that the source table is similar to the destination
table, (except that one is on SQL and the other on Oracle). What I want to
know is why does it change?
I previously used SQL*Loader and I didn't have to change the sizes.
I really appreciate your assistence guys. Thank you in advance.
Regards,
Pauline
oracledba-ezmlmsh
ield-x13019177.x1
[Email Address Removed] To
.com [Email address protected]
cc
2008/01/08 01:04
PM Subject
RE: export schema
HI,
I think it's the fact that your data is longer than the column definition
you've given for the external table.
M.
-----Original Message-----
From: pauline
[mailto:oracledba-ezmlmshield-x1964267.[Email address protected]
Sent: 08 January 2008 10:58
To: LazyDBA Discussion
Subject: RE: export schema
Thank you Viswa, Amit
I have created the external table, now the problem comes when I have to
select data from it. I get an ORA-01401.
It looks like the datatypes are different from those I specified on the
external table. DO you have any idea why this could be the case?
This is the structure of my external table:
create table pauline.xternal_tester
( JAN VARCHAR2(4 BYTE),
FEB VARCHAR2(10 BYTE),
MAR VARCHAR2(8 BYTE)
)
organization external
( default directory xternal_data_dir
access parameters
( records delimited by newline
fields terminated by ','
)
location ('tester.csv')
)
reject limit unlimited;
This is the output of the LOG:
Field Definitions for table XTERNAL_TESTER
Record format DELIMITED BY NEWLINE
Data in file has same endianness as the platform
Rows with all null fields are accepted
Fields in Data Source:
JAN CHAR (255)
Terminated by ","
Trim whitespace same as SQL Loader
FEB CHAR (255)
Terminated by ","
Trim whitespace same as SQL Loader
MAR CHAR (255)
Terminated by ","
Trim whitespace same as SQL Loader
.
.
error processing column JAN in row 1 for datafile c:\temp\tester.csv
ORA-01401: inserted value too large for column
oracledba-ezmlmsh
ield-x80803713.x1
[Email Address Removed] To
.com [Email address protected]
cc
2008/01/08 11:36
AM Subject
RE: export schema
**********************************************************************
This e-mail is confidential and may be privileged.
It may only be read, copied and used by the intended recipient.
If you have received it in error please contact the sender immediately
by return e-mail. Please then delete the e-mail and any copies of it
and do not use or disclose its contents to any person.
**********************************************************************
Registered Office: Farncombe House, Broadway, Worcestershire, WR12 7LJ
AccuRead Limited Registered Number: 3076187 England
GSL UK Limited Registered Number: 3333860 England
Global Solutions Limited Registered Number: 3189802 England
**********************************************************************
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
If you are not the addressee, please inform us immediately that you have
received this e-mail by mistake, and delete it. We thank you for your
support.
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
**********************************************************************
This e-mail is confidential and may be privileged.
It may only be read, copied and used by the intended recipient.
If you have received it in error please contact the sender immediately
by return e-mail. Please then delete the e-mail and any copies of it
and do not use or disclose its contents to any person.
**********************************************************************
Registered Office: Farncombe House, Broadway, Worcestershire, WR12 7LJ
AccuRead Limited Registered Number: 3076187 England
GSL UK Limited Registered Number: 3333860 England
Global Solutions Limited Registered Number: 3189802 England
**********************************************************************
Oracle LazyDBA home page