My Oracle Support Banner

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

Last updated on FEBRUARY 25, 2019

Applies to:

Oracle Database - Enterprise Edition - Version 10.1.0.2 to 11.2.0.4 [Release 10.1 to 11.2]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
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 <USER_NAME> identified by test default tablespace users temporary tablespace temp;
grant connect, resource to <USER_NAME>;

connect <USER_NAME>/<PASSWORD>

create table <TABLE_NAME>
(
   <COLUMN_NAME> timestamp(6)
);

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

begindata
2007-10-03-15.22.40.429675

-- start SQL*Loader with
sqlldr <USER_NAME>/<PASSWORD> control=ldr.ctl

The results in table:

SQL> select * from <TABLE_NAME>;

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

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

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Changes
Cause
Solution
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.