Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Bug in sqlldr using trim in ctl

$
0
0
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 "<DATE>"
,static_2 CONSTANT "<REGION>"
,static_flag EXPRESSION "CASE WHEN :status = 'A' THEN 'V' ELSE 'I' END"
,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
,static_flag VARCHAR2(1) DEFAULT 'V' 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 cannot find any reference on any of the web sites.
Please guide me.

I am using 11g

Viewing all articles
Browse latest Browse all 13329