Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

sysdate on sqlldr

648 views
Skip to first unread message

Gary Turner

unread,
Jan 7, 2002, 4:09:27 PM1/7/02
to
does anyone know how to get the date and time using the sysdate function on
sqlldr. i can only get the date to be displayed. i have tried the on two
different operating systems and see the same output.

Ron Reidy

unread,
Jan 7, 2002, 7:42:53 PM1/7/02
to
A date datatype includes time. You can do the following in SQL*Plus:

1. alter session set NLS_DATE_FORMAT = <date/time picture>;

2. select to_char(column, <date/time picture>) from table;

See the Oracle docs for more info.
--
Ron Reidy
Oracle DBA

Ted Chyn

unread,
Jan 7, 2002, 10:48:49 PM1/7/02
to
gary, if you want load to a date field

in control file specify <column name > sysdate will do.
ted chyn
"Gary Turner" <gary....@sci.com> wrote in message news:<x3o_7.147690$lV4.25...@e420r-atl1.usenetserver.com>...

Stan

unread,
Jan 8, 2002, 12:46:25 AM1/8/02
to
Gary,

you can specify sysdate in controlfile and have them formatted with time
component. here is an example of a controlfile to load data with datetime.

LOAD DATA
INFILE location_of_dat_file
INTO TABLE xyz
( rec_no "your_sequence.nextval",
date_inserted "to_char(SYSDATE, 'dd-mon-yyyy hh24:mi')",
col1 POSITION(1:5) "col1",
col2 POSITION(6:15) "col2",
data3 POSITION(16:22)"col3"
)

hth,
Stan

0 new messages