I'm trying to copy data from MySQL to SQL Server 2008. My SSIS is generating error for time (DBTime) column in MySQL database. (cannot convert dbtime to dbtime2) What datatype can i use in SQL server for time? I tired nvarchar, varchar and also tried data conversion task but i get same error.
+2
A:
You could use time or datetime.
EDIT:
Now that I see the type of data that MySQL uses for time what you probably want to do is to put the data into an nvarchar on the SQL Server side, and in SSIS you can invoke
TIME_FORMAT(timecol, '%H:%i:%S')
The SSIS tool lets you do specifications of how to manipulate individual columns before inserting into the other database using scripting.
Tony Miller
2010-08-06 14:29:19
i tried time and it gives me error cannot convert dbtime to dbtime2, i dont want to use datetime because it will convert into date.
rs
2010-08-06 14:46:36
Please provide more information. There is no dbtime data type in MySQL. What is the data type of the column in MySQL, and what is the data type of the SQL Server column?
Tony Miller
2010-08-06 15:50:38
time in MySQL and time in SQLServer, dbtime is SSIS representation of mysql time datatype and dbtime2 for sql server
rs
2010-08-06 18:41:58