【发布时间】:2018-09-10 05:32:34
【问题描述】:
您好,我有 csv 文件数据,例如:- (ActiveDate= 20180105) 所以我想将此列保存到我的数据库中。在我的数据库列数据类型是 datetime 。
当使用数据转换作为 DT_Date 我得到这个错误:-
转换返回状态值 2 和状态文本“值 由于可能丢失数据,无法转换。
那么我如何将这个 ActiveDate 数据从我的 excel 导入到我的数据库中作为 datetime ?
你能帮帮我吗?
【问题讨论】:
-
您尝试过@Justin 的建议吗?您当前遇到的错误是什么?
-
是的,我收到了这个错误:-
[Derived Column [36]] Error: An error occurred while attempting to perform a type cast. [Derived Column [48]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "Derived Column" failed because error code 0xC0049064 occurred, and the error row disposition on "Derived Column.Outputs[Derived Column Output].Columns[DERIVED_ADMIT_DATE]" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure. -
在
Derived Column中执行CAST之前,您是否使用Data Conversion将您的输入Number转换为String? -
@Abhishek :- 是的,我已经做到了
-
你的实现一定有问题,你可能遗漏了什么——因为描述的方法工作得很好。