I'm trying to convert the data of a specific column in a text file, during a SSIS process.
The column in question contains "numeric" values or an empty space or null value or "--" (two dashes). I want to "replace" the empty space or "--" with a null value (DT_I4) and convert the numeric value to an integer (DT-I4) since the column in the data base is an int field.
This is the code that I have in the expression field
civilianYears == "--" || civilianYears == " " ? NULL(DT_I4) : (DT_I4)civilianYears
However, when I run the task it keeps giving me an error message: The "Derived Column" failed because error code 0xC0049063 occurred, and the error row disposition on "Derived Column.Outputs[Derived Column Output].Columns[New]" 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.
I have a feeling it's the conversion in the "true" and "false" part but I can't figure out what it is.
Any assistance would be greatly appreciated
The column in question contains "numeric" values or an empty space or null value or "--" (two dashes). I want to "replace" the empty space or "--" with a null value (DT_I4) and convert the numeric value to an integer (DT-I4) since the column in the data base is an int field.
This is the code that I have in the expression field
civilianYears == "--" || civilianYears == " " ? NULL(DT_I4) : (DT_I4)civilianYears
However, when I run the task it keeps giving me an error message: The "Derived Column" failed because error code 0xC0049063 occurred, and the error row disposition on "Derived Column.Outputs[Derived Column Output].Columns[New]" 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.
I have a feeling it's the conversion in the "true" and "false" part but I can't figure out what it is.
Any assistance would be greatly appreciated