My Oracle Support Banner

SQLLOADER Not Loading Timestamp Correctly (Doc ID 2683037.1)

Last updated on JUNE 24, 2020

Applies to:

Oracle Database - Enterprise Edition - Version 19.3.0.0.0 and later
Information in this document applies to any platform.

Symptoms

NOTE: In the images and/or the document content below, the user information and environment data used represents fictitious data from the
Oracle sample schema(s), Public Documentation delivered with an Oracle database product or other training material.  
Any similarity to actual environments, actual persons, living or dead, is purely coincidental and not intended in any manner.

 

Trying to load timestamp with nanoseconds into Oracle table with column datatype as timestamp(9) defined.
For timestamp like - 2020-06-20 23:59:59.999999999, ORacle is rounding it up to next day. When we insert the same timestamp using insert statement, its inserted correctly.


SQLLOADER control file:
Options (skip = 1 , errors = 2147483647)^M
load data ^M
infile 'authdb_trans.ck_withhold.csv' "str '<LINE~END>\n'"^M
append^M
into table authdb_trans.ck_withhold^M
fields terminated by '¬'^M
trailing nullcols^M
( ^M
AUTHORISATION_ID CHAR(29),
POSTING_ACCOUNT CHAR(40),
WITHHOLD_ORIGIN CHAR(1),
WITHHOLD_STATUS CHAR(1),
EXPIRATION_DATE TIMESTAMP 'YYYY-MM-DD HH24:MI:SS.FF9',
WITHHOLD_REFERENCE CHAR(50),
WITHHOLD_AMOUNT ,
WITHHOLD_CURRENCY CHAR(3),
WITHHOLD_TS TIMESTAMP 'YYYY-MM-DD HH24:MI:SS.FF9'^M
)

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


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