-
Truncate time using SQL Loader
Hi,
I have a date field in my data file containing date + time, like, 2002-12-24 08:54:40.29.
I need to insert this field in 'MM/DD/YYYY' format in the table using SQL Loader. Is there a way to truncate the time?
Can anyone please suggest an option to do so at the earliest as this is urgent!
Thanks.
Last edited by shivam; 10-01-2008 at 06:25 AM.
-
You can include to_char() function in your SQL*Loader list of columns, lke...
MyColumn EXPRESSION "to_char(MyDate, 'mm/dd/yyyy')"
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
-
Thanks!
I tried one more option which worked for me -
MyColumn "To_date(substr(:MyColumn,1,10),'YYYY-MM-DD')"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|