DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: sqlloader error

  1. #1
    Join Date
    Jun 2000
    Location
    chennai,tamil nadu,india
    Posts
    159
    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,

  2. #2
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    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?

  3. #3
    Join Date
    Aug 2001
    Location
    chennai,bangalore
    Posts
    840
    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
  •  


Click Here to Expand Forum to Full Width