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

Thread: A quick question on SQL LOADER

  1. #1
    Join Date
    Jun 2000
    Location
    chennai,tamil nadu,india
    Posts
    159
    Hi,
    I have a text file consist of date column.

    For example
    2002-10-12 13:55:20.356

    I need to use the sqlload script to load this data without the last 3 digits(milliseconds)

    load data
    append into xxx

    col1 date "YYYY-MM-DD HH24:MI:SS"

    How can i avoid the .356 when i load the data.Pls. help me


  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Off the top of my head, I think you can use SUBSTR() in sqlldr, although I'm not sure with dates... I'd have to setup an example...
    Jeff Hunter

  3. #3
    Join Date
    Apr 2001
    Posts
    219
    ______________________
    Applications come and go,
    but the data remains!

  4. #4
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Add 4 blank characters at the end of your date format mask, ie
    Code:
    col1 date "YYYY-MM-DD HH24:MI:SS    "
                                    ^^^^
    That will do the trick.

    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  5. #5
    Join Date
    Feb 2002
    Posts
    166
    Thx, I met this problem when I loaded data from SQL server to Oracle too. My ideal is to import the data to text file from SQL server then transfer the file by CD or FTP then I failed to import the text file smoothly due to improper date format. My final solution is to load it into local SQL server first then do DTS.
    MCSE/MCDBA, OCP DBA 8i
    Working on SCJP -> SCJD

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