Home » RDBMS Server » Server Utilities » SQL Laoder Date Handling (Oracle 10g)
SQL Laoder Date Handling [message #571765] Fri, 30 November 2012 03:49 Go to next message
vino06cse57
Messages: 131
Registered: July 2011
Location: chennai
Senior Member
Hi

I will get the data in DD-MM-YYYY format in CSV file.
When i am using SQL Loader to load the data from CSV file it throws invalid month error.

Deafult Date Format in my DB id DD-Mon-YY

Please help me in resolving it.

Here is the Control File
LOAD DATA
INFILE 'C:\Users\vinodkumar\Desktop\Date.txt' 
BADFILE 'C:\Users\vinodkumar\Desktop\Date.bad'
DISCARDFILE 'C:\Users\vinodkumar\Desktop\Date.dsc'

INTO TABLE "FINCALIVE"."BI_TEST_DATE"
APPEND
FIELDS TERMINATED BY ','
(MIS_DATE)

Sample Date:
MIS_DATE
--------------
30-11-2012
01-12-2012
02-12-2012
03-12-2012
04-12-2012
05-12-2012
06-12-2012
07-12-2012
08-12-2012
09-12-2012
10-12-2012
11-12-2012
12-12-2012
13-12-2012
14-12-2012
15-12-2012
16-12-2012
17-12-2012
18-12-2012
19-12-2012
20-12-2012
Re: SQL Laoder Date Handling [message #571767 is a reply to message #571765] Fri, 30 November 2012 03:55 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You have to give the date format in the control file.

Regards
Michel
Re: SQL Laoder Date Handling [message #571769 is a reply to message #571767] Fri, 30 November 2012 03:59 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
(MIS_DATE DATE "DD-MM-YYYY")

Regards
Michel

Re: SQL Laoder Date Handling [message #571777 is a reply to message #571769] Fri, 30 November 2012 04:50 Go to previous messageGo to next message
vino06cse57
Messages: 131
Registered: July 2011
Location: chennai
Senior Member
hi Mike

Still i cant able to perfrom.when i use Toad Sql loaeder wizard.its overriding the control file.even though i secify the Date format

Re: SQL Laoder Date Handling [message #571778 is a reply to message #571777] Fri, 30 November 2012 04:59 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Through away TOAD.

Regards
Michel
Re: SQL Laoder Date Handling [message #571779 is a reply to message #571778] Fri, 30 November 2012 05:11 Go to previous message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
TOAD offers 2 options: one is to build a control file; another one is to use existing one. Which option did you use (so that it was "overriding the control file")? According to what you said, it seems that you HAVE a control file, but chose not to use it. Is that correct?
Previous Topic: Unable to import one procedure from full database dump ( 10g )
Next Topic: Need to copy table with NCLOB column into another database (10g to 11g)
Goto Forum:
  


Current Time: Fri Apr 19 14:54:08 CDT 2024