rs.
rs.

Reputation: 27427

SSIS MYSQL to SQL Datatype

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.

Upvotes: 2

Views: 1408

Answers (1)

Tony Miller
Tony Miller

Reputation: 9159

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.

Upvotes: 2

Related Questions