Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 import Date from csv file

Author  Topic 

Gili
Starting Member

42 Posts

Posted - 2006-07-27 : 02:39:27
Hi experts

i've create a dts that import data from csv file to a table in my sql server.
but when i execute it the DTS is failed.
the problem is that i have a Date\Time field and in the CSV the column with the date value look like this--->

1943-10-26

Or like this

01/07/1962

but some how the dts can't transform it.
plz help.
thanks.

nr
SQLTeam MVY

12543 Posts

Posted - 2006-07-27 : 04:18:24
Import it into a character column.
You can transform it but if you are getting a variable format then you probably shouldn't.
Can you get the file created consistently? I would be concerned about other problems this file might have if you try to cater for things like this.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

Gili
Starting Member

42 Posts

Posted - 2006-07-27 : 05:35:41
i'm sure that there is a way to import the date value in the csv file to the date/time table field.
plz any help...
Go to Top of Page
   

- Advertisement -