- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: date problem with sqlldr
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2001 11:48 AM
тАО10-26-2001 11:48 AM
I have data date.dat file including the following data
20011025
20011025
20011025
20011025
I need to loaded into oracle table ABC which has a create_date column of type date.
The control file I use is like
load data
infile '/home/janez/date.dat'
append
into table ABC
fields terminated by " "
(CREATION_DATE )
It won't work since the sysdate data format is 25-OCT-01. I can not reset nls-date-format parameter since other users are using this format to import data.
Can anybody give me some suggestion, or maybe we can do something about the control file?
Thank you for the help,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2001 12:09 PM
тАО10-26-2001 12:09 PM
Re: date problem with sqlldr
Here is what to do:
load data
infile '/home/janez/date.dat'
append
into table ABC
fields terminated by " "
(CREATION_DATE ???yyyy-mm-dd???)
Andreas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2001 12:11 PM
тАО10-26-2001 12:11 PM
Re: date problem with sqlldr
load data
infile '/home/janez/date.dat'
append
into table ABC
fields terminated by " "
(CREATION_DATE DATE ???yyyy-mm-dd???)
Andreas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2001 12:19 PM
тАО10-26-2001 12:19 PM
SolutionThe correct datemask is "YYYYMMDD" not "yyyy-mm-dd" is I typed: That would be for 2001-10-25 dates...
Andreas
Finaly got it right!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2001 12:45 PM
тАО10-26-2001 12:45 PM
Re: date problem with sqlldr
Thanks for the solution, it works!
May I ask you a further question? How Can I import the data without the header column?
for example,
the data file looks like,
DATE
20011025
20011025
20011025
20011025
The first line will give error since DATE is not a date value.
I tried to "skip 1" in the control file, but it did like it either.
Regards,
Jane
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2001 03:43 PM
тАО10-27-2001 03:43 PM
Re: date problem with sqlldr
I used skip=1 as command line parameter, sqlldr skipped the first header line.
thanks,
Jane
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-28-2001 06:02 AM
тАО10-28-2001 06:02 AM
Re: date problem with sqlldr
I usually depend on sqlloader to skip the header row itself due to data inconsistency, but ofcourse your way is better.
Andreas