Friday, February 17, 2012

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?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.|||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|||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.|||Brilliant - all works well. Thanks a milliuon for all your help.

No comments:

Post a Comment