开发者

SSIS casting error

Im getting a "An error occurred while attempting to perform a type cast" when using a derived column to format some error information. My Expression is a follows

(DT_STR,255,1252)("Insert Employee Error - EmployeeID:" + (DT_STR,255,1252)ID)

The I开发者_如何学CD column is an integer. Strangely enough i'm doing something similar in another package and this works fine. any ideas?

Heres my meta data passed to the derived column

SSIS casting error


I don't have any VMs handy for 2005 if that's your environment but the derived column transformation played looser with data types than 2008 so my test scenario, 2008 R2, ought to be valid regardless.

I see nothing wrong with your expression there. I spun up a quick package to verify your expectation that it works and it works for me.

SSIS casting error

Added a row with null value based on Siva's comment but does not appear to be the source of the OP's problem

SSIS casting error

A few things to check on the metadata preceding the derived column transformation

  • Is the casing of the column ID really ID?
  • Is the data type really 4 byte signed int? (DT_I4)
  • Try wrapping the ID column with [ID] or remove the ID completely and re-drag it from the Columns list
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜