Error converting DateTime field to DateTime2 in SQL2008 with DDT


Author
Message
Edhy Rijo
E
StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Trent,

Today I upgraded my dev computer to SQL2008, I want to take advantage of the new DateTime2 and Date fields in SQL2008, after changing one of table in the DDT to use DateTime2 and deploying the package I got the following error:



X 4/13/2009 1:50:05 PM   -> Altering table 'Inventory' failed.

X 4/13/2009 1:50:05 PM   -> FailedOperationException

X 4/13/2009 1:50:05 PM   -> Alter failed for Table 'dbo.Inventory'.

X 4/13/2009 1:50:05 PM   -> ExecutionFailureException

X 4/13/2009 1:50:05 PM   -> An exception occurred while executing a Transact-SQL statement or batch.

X 4/13/2009 1:50:05 PM   -> SqlException

X 4/13/2009 1:50:05 PM   -> Implicit conversion from data type datetime to int is not allowed. Use the CONVERT function to run this query.

X 4/13/2009 1:50:05 PM   ->

X 4/13/2009 1:50:05 PM   -> Source : Microsoft.SqlServer.Smo





Shouldn't the DDT take care of running whatever command is required to do this type of conversions? or this must be handle via the Pre/Post script?


Edhy Rijo

Attachments
Trent Taylor
Trent Taylor
StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
No...this is an entirely different data type.  So the DDT (at present) doesn't automatically perform this conversion for you so you will have to handle this at the moment.  At some point I will look to see if we can integrate this...but today...you will have to do it. Smile
Edhy Rijo
E
StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Thanks Trent, I will play with the scripts to handle this.

Edhy Rijo

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search