I'm importing data from a DB2 database to SQL Server 2005.
Everything is working fine, with the exception of when I try to import a DB2 Timestamp field.
I've tried to go from....
DB2 Timestamp to SQL Server 2005 SMALLDATETIME
DB2 Timestamp to SQL Server 2005 DATETIME
In both cases, the SQL Server Import fails saying that the Timestamp fields would be truncated.
When I look at the values in the DB2 Timestamp field, they are formatted as YYYY-DD-MM HH24:MI:SS.SSSSSSSSSSSSSSSSSS with a lot of decimal places on the seconds (appears to be a lot more than SQL Server captures on the DATETIME field)
Thinking this was the issue, I used the following function in my original SQL statement that is run against DB2 to cut down on the # of decimal places...
varchar_format(Creation_Date_Timestamp,'YYYY-DD-MM HH24:MI:SS') as Creation_Date_Timestamp.
This works fine going into the DATETIME field in SQL Server 2005, but I'd rather not have to do this on every date field in the database.
Is there a different variable type I should be using on the SQL Server side to import these values into?