How To Load SYSDATE + 1 Using SQL*Loader? (Doc ID 949742.1)

Last updated on SEPTEMBER 22, 2011

Applies to:

Oracle Server - Enterprise Edition - Version: 9.2.0.1 to 11.2.0.2 - Release: 9.2 to 11.2
Information in this document applies to any platform.

Goal

You load a date field in a table using SYSDATE. But when you want to load the date field with SYSDATE + 1 you receive an error, like the next test case demonstrates:

connect test/test

create table tst
(
   a date,
   b date,
   c number,
   d varchar2(10)
);

-- SQL*Loader control file
load data
infile *
append
into table tst
(
   a SYSDATE,
   b SYSDATE + 1,
   c position (1:3),
   d position (5:6)
)

begindata
123 ab
234 cd

-- Start SQL*Loader
#> sqlldr test/test control=ldr.ctl

SQL*Loader-350: Syntax error at line 7.
Expecting "," or ")", found "+".
b SYSDATE + 1,

What is the right format for SYSDATE + 1 in SQL*Loader?

Solution

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