Home » RDBMS Server » Server Utilities » A DATE datatype question (SQL*Loader)
A DATE datatype question (SQL*Loader) [message #474241] Fri, 03 September 2010 16:53 Go to next message
lpimentel
Messages: 10
Registered: September 2010
Junior Member
may I use ??

trunc(sysdate,'DD')

EDITED by LF: Message split from a hijacked topic. As it is not quite clear what it is about, I "created" a dummy title (which might be modified once we find out what the problem is).

[Updated on: Sat, 04 September 2010 04:01] by Moderator

Report message to a moderator

Re: insert only date using sqlldr [message #474255 is a reply to message #474241] Sat, 04 September 2010 01:56 Go to previous messageGo to next message
Michel Cadot
Messages: 58612
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
To achieve what?

Regards
Michel
Re: insert only date using sqlldr [message #474513 is a reply to message #474255] Mon, 06 September 2010 15:44 Go to previous messageGo to next message
lpimentel
Messages: 10
Registered: September 2010
Junior Member
Hi Michel !

I'm trying to load data using Oracle Loader
as below and it shows an error.
Do you correct syntax ?
tks.

SQL*Loader-350: Syntax error at line 18.
Expecting "," or ")", found " TRUNC ".
LAST_UPDATE TRUNC(SYSDATE, 'DD')




CTL:

OPTIONS (SKIP=1,SILENT=(HEADER, FEEDBACK))
LOAD DATA
APPEND
INTO TABLE GL_BALANCE_SHEET
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' AND '"'
TRAILING NULLCOLS
(
PARTITION_KEY CHAR(12),
COMPANY_CODE CHAR(12),
GL_ACCOUNT_CODE CHAR(50),
CURRENCY_CODE CHAR(3),
BALANCE ,
DEBIT_CREDIT CHAR(1),
AMOUNT_1 ,
AMOUNT_2 ,
GAAP_CODE CHAR(12),
IMPORT_SOURCE CHAR(20),
LAST_UPDATE trunc(sysdate,'DD')

)
Re: insert only date using sqlldr [message #474515 is a reply to message #474513] Mon, 06 September 2010 15:46 Go to previous messageGo to next message
BlackSwan
Messages: 22525
Registered: January 2009
Senior Member
It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/

[Updated on: Mon, 06 September 2010 15:46]

Report message to a moderator

Re: insert only date using sqlldr [message #474517 is a reply to message #474515] Mon, 06 September 2010 15:53 Go to previous messageGo to next message
Littlefoot
Messages: 19329
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Try with
LAST_UPDATE "trunc(sysdate,'DD')"
(double quote sign)
Re: insert only date using sqlldr [message #474518 is a reply to message #474517] Mon, 06 September 2010 16:03 Go to previous messageGo to next message
lpimentel
Messages: 10
Registered: September 2010
Junior Member
Excellent !! It works!

Tks a lot.
Re: insert only date using sqlldr [message #474520 is a reply to message #474518] Mon, 06 September 2010 16:18 Go to previous message
Littlefoot
Messages: 19329
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
SQL*Loader documentation; a lot of questions can be answered just by reading it.
Previous Topic: sqlldr / external table questions
Next Topic: Oracle Data Pump
Goto Forum:
  


Current Time: Tue Jul 29 17:08:39 CDT 2014

Total time taken to generate the page: 0.09738 seconds