如何在SSIS数据流任务中应用以下转换
cast(gift_amount as int)/100
在派生列转换编辑器中,我无法更改数据类型。它给出0xC0049064
函数时给出typecast
错误。
你可以使用qazxsw poi实现这一点
script component
Script Component
标记为输入列gift_amount
)outColumn
你应该试试
If Not Row.giftamount_IsNull AndAlso
Not String.IsNullOrEmpty(Row.giftamount) Then
Row.outColumn = CDec(CInt(Row.giftamount) / 100)
Else
Row.outColumn_IsNull = True
End If
此外,在Derived Column Editor窗口中,您可以添加其他类型的强制转换 - 查看编辑器右上角的一些选项。
((DT_I4)gift_amount)/100