views:

61

answers:

1

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
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
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
time in MySQL and time in SQLServer, dbtime is SSIS representation of mysql time datatype and dbtime2 for sql server
rs