Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2006
    Posts
    3

    Red face Unanswered: csv import into ms sql 2000

    I've got a csv file (75000 records) with 5 columns, one is a date of birth column which shows as an 8 digit long integer (yyyymmdd). I've tried sql dts but I just don't know how to show this column in sql as a date field in dd/mm/yyyy format. Can anyone please help???

  2. #2
    Join Date
    Jan 2006
    Location
    USA
    Posts
    115
    Using Excel you can change the cell format as you required & upload data in the SQL database but in Excel maximum row limit is 65536.

    You can divide this data in two excel sheet & can proceed.

    If you are not going to do this task frequently than it is fine, else find some better solution.
    Rajesh Patel

    Everybody says - mistake is the first step of success, but it's not true. The correction of the mistake is the first step of success.

  3. #3
    Join Date
    Sep 2006
    Posts
    3
    Thanks Rajesh - i've tried that, the problem is that the date of birth field has no date separators, and being in number format, a excel just fills the cell with "###############". Today (2nd sept 2006) shows like an integer 20060902.
    Thanks again for your quick reply.
    Arthur

  4. #4
    Join Date
    Jan 2006
    Location
    USA
    Posts
    115
    Still Excel helps you lot. Check the enclosed file, it is self explanatory.

    Add four columns next to your date column & add formulas same as enclosed file.

    At the last check data then Copy -> Paste Special -> Value. Remove unwanted columns & upload data.

    Little hard work but fruitful.
    Attached Files Attached Files
    Rajesh Patel

    Everybody says - mistake is the first step of success, but it's not true. The correction of the mistake is the first step of success.

  5. #5
    Join Date
    Sep 2006
    Posts
    3
    Brilliant - all works well. Thanks a milliuon for all your help.

Posting Permissions

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