Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to pass current date into sqlloader script

Sanders_2503Jan 30 2012 — edited Jan 30 2012
I have a sqlloader script which loads the data into a table with apparently a large number of columns..my loader script looks like this -
options (skip=2)
load data
badfile 'C:\CAP_SPS\Batchscripts\psafixbad.txt'
discardfile 'C:\CAP_SPS\Batchscripts\psafixdiscard.txt'
append
into table sps_psafix
when record_layer='Project'
fields terminated by ','
trailing nullcols
(
record_layer position(1),
file_name,
attr1,
attr2 filler,
attr3 filler,
attr4 filler,
attr5 filler,
attr6 filler,
attr7 filler,
attr8 filler,
...
...
read_flag constant '0',
select current_date from dual
)
the last column is a load timestamp column and I want to capture it from the run-time instead of manually updating it. But the sqlloader is erroring out saying -

SQL*Loader-350: Syntax error at line 268.
Expecting "," or ")", found "current_date".
select current_date from dual
^

Any idea how to pass on the latest date to the field?

Appreciate your inputs.

Thanks,
Sanders.
This post has been answered by Solomon Yakobson on Jan 30 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 27 2012
Added on Jan 30 2012
2 comments
1,726 views