Hi Guys,
When I am trying to upload data using ctl file having trim in one of the fields, the length of that column in database is not being considered.
The control file is
OPTIONS (SKIP=1, ERRORS=99999999, DIRECT=TRUE )
LOAD DATA
CHARACTERSET WE8ISO8859P15
APPEND
INTO TABLE s_test_trim
WHEN RECORD_TYPE='D'
FIELDS TERMINATED BY '|'
TRAILING NULLCOLS
( static_1 CONSTANT "13-Sep-2013" ,
static_2 CONSTANT "AMERICAS" ,
field_1 CHAR "TRIM(:field_1)" );
The ddl for table is
CREATE TABLE s_test_trim
( static_1 DATE NOT NULL ,
static_2 VARCHAR2(10) NOT NULL ,
field_1 VARCHAR2(10) )
COMPRESS ;
Now, when I am trying to load data of field length > 10 for field_1, it is allowing me to do so.
I mean the field length for field_1 is 10, but when I am trying to insert data having value greater than 10 chars, it is inserting the data into the column.
When I am trying to do the same, using insert statement, it is throwing expected error message.
I am using 11g
Please guide me.