-
This is the ctl file i run and i got a error
ora - 01821 date format not recoganised
Pls. help me with the solution
LOAD DATA
INFILE *
APPEND INTO TABLE XX
fields terminated by ","
(last_handshake varchar,
last_started date "to_date(:last_started,'YYYY-MM-DD HH24:MI:SS')" )
BEGINDATA
10:43:35,2002-06-30 11:20:08,
10:43:35,2002-06-30 11:20:08,
10:43:35,2002-06-30 11:20:08,
-
Two isues:
1- your last_started field is defined as type DATE, so you must not use "TO_DATE()" string function on it. Simply supply the format mask, that's all.
2 - you must define your last_handshake field as CHAR, not as VARCHAR. Do not confuse this SQL*Loader's datatypes with database datatypes, your database column might as well be defined as VARCHAR or VARCHAR2, but in controlfile you use CHAR datatype.
So the following control file should do:
LOAD DATA
INFILE *
APPEND INTO TABLE XX
fields terminated by ","
(last_handshake char,
last_started date 'YYYY-MM-DD HH24:MI:SS' )
BEGINDATA
10:43:35,2002-06-30 11:20:08,
10:43:35,2002-06-30 11:20:08,
10:43:35,2002-06-30 11:20:08,
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
-
instead of to_Date use to_char....
regards
anandkl
anandkl
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
|