SQLLDR Wrongly Calculates The Field Length Based On Timestamp Format Mask (Doc ID 1317487.1)

Last updated on NOVEMBER 28, 2016

Applies to:

Oracle Database - Enterprise Edition - Version 10.1.0.2 to 11.2.0.4 [Release 10.1 to 11.2]
Information in this document applies to any platform.

Symptoms

You loaded data into a table with a column TIMESTAMP(6) and observed that the last digit from fractional part of seconds is lost (zeroed).

Let's follow the next example that demonstrates this:

connect / as sysdba
create user test identified by test default tablespace users temporary tablespace temp;
grant connect, resource to test;

connect test/test

create table a_tab
(
   a_date timestamp(6)
);

-- write the control file ldr.ctl
load data
infile *
truncate
into table a_tab
(
   a_date position(1) timestamp "YYYY-MM-DD-HH24.MI.SS.FF6"
)

begindata
2007-10-03-15.22.40.429675

-- start SQL*Loader with
sqlldr test/test control=ldr.ctl

The results in table:

SQL> select * from a_tab;

A_DATE
-----------------------------
03-OCT-07 03.22.40.429670 PM

=> The last digit in fractional part of seconds "429675" is zeroed ("429670").

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms