0

Errors are generated on a few specific tables. This conversion is successful on other tables between the two data types. I've run out of places to look for the problem. I've tried creating a new project, tried various datatypes like datetime or date, and tried different sources. I've even removed these problem tables, and the same error pops up on a table that was previously successfully migrated. Some tables that fail to migrate when done with others are successful when migrated by themselves. One table fails consistently.

String value was trimmed because target column size is less then string length. The given value of type OracleDate from the data source cannot be converted to type datetime2 of the specified target column.

Amira Bedhiafi
  • 8,088
  • 6
  • 24
  • 60

1 Answers1

0

The error message mentions that the string value was trimmed because the target column size is smaller than the string length. Ensure that the target column in SQL Server has enough space to accommodate the converted value.

CREATE TABLE MyTable (ColA char(2))
INSERT INTO MyTable (ColA) VALUES ('ABCD')
Msg 2628 Level 16 State 1 Line 1
String or binary data would be truncated in table 'fiddle_52f76c559d5f4610b652eed4a6ad60d9.dbo.MyTable', column 'ColA'. Truncated value: 'AB'.
Msg 3621 Level 0 State 0 Line 1
The statement has been terminated.

fiddle

Amira Bedhiafi
  • 8,088
  • 6
  • 24
  • 60