Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2001
    Location
    Bangalore
    Posts
    186

    Unanswered: date data format for sqlldr

    Hi,

    I have a extracted sybase data into flat files which i need to load into Oracle tables. Now the problem is i have datetime column which gives me datetime data like this in flat file:

    2050-01-01 16:43:35.670

    Oracle accepts the data as per the NLS setting which in my case is
    DD-MON-YYYY HH24:MIS

    Please let me know how we can format and load the datetime data into Oracle.

    cheers,
    Prashant

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool


    Use the TO_DATE() function:
    Code:
    INFILE 'TheFile.txt'
    ...etc...
    (col1
    ,datecol "TO_DATE(SUBSTR(:datecol,1,20),'DD-MON-YYYY HH24:MI:SS')"
    ...)

    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    May 2004
    Location
    Dominican Republic
    Posts
    721
    Or just set the NLS_DATE_FORMAT environment variable at your OS.

  4. #4
    Join Date
    Sep 2004
    Location
    London, UK
    Posts
    565
    Your're in luck, they documented it.

  5. #5
    Join Date
    Jul 2003
    Posts
    2,296
    I'd like to say that you should have read the documentation or searched this forum. Both would show various examples to solve your problem.
    - The_Duck
    you can lead someone to something but they will never learn anything ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •