Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi, I have around 1 lakh data wh

Status
Not open for further replies.

rk68

Programmer
Jul 15, 2003
171
IN
Hi,

I have around 1 lakh data which I need to upload in Oracle using sqlldr.

One of the field in the data is in this format 2012-03-28 11:10:45.457444

In order to create a table, what should be the format for the above field - timestamp?
How do i import this data using sqlldr - the syntax for uploading this field.


TIA
Raj
 
I would say use DATETIME data type and use TO_DATE function:
[tt]
TO_DATE('2012-03-28 11:10:45.457444', 'YYYY-MM-DD HH:MI:SS')[/tt]

Have fun.

---- Andy

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.
 
That will not work. You will get the ORA-01830 error (ORA-01830: date format picture ends before converting entire input string) use a timestamp and it will work fine.


1* select TO_timestamp('2012-03-28 11:10:45.457444', 'YYYY-MM-DD HH24:MI:SS.ff6') from dual;

TO_TIMESTAMP('2012-03-2811:10:45.457444','YYYY-MM-DDHH:MI:SS.FF6')
---------------------------------------------------------------------------
28-MAR-12 11.10.45.457444000 AM


Bill
Lead Application Developer
New York State, USA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top