Im trying to workout how to write an expression in the derived Column task, to extract a readcode e.g (XXXX) from another column
ID | Ethnicity | ReadCode
-------------------------------------
1 | (XXXX) White British | (XXXX)
So far i have the expression
But it throws up an error:
[Derived Column 2 [11]] Error: An error occurred while evaluating the function.
[Derived Column 2 [11]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "Derived Column 2" failed because error code 0xC0049067 occurred, and the error row disposition on "Derived Column 2.Inputs[Derived Column Input].Columns[ReadCode]" 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.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Derived Column 2" (11) failed with error code 0xC0209029 while processing input "Derived Column Input" (12). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure.
Can anyone help?
ID | Ethnicity | ReadCode
-------------------------------------
1 | (XXXX) White British | (XXXX)
So far i have the expression
Code:
"(" + SUBSTRING(Ethnicity,(FINDSTRING(Ethnicity,"(",1) + 1),(FINDSTRING(Ethnicity,")",1) - 2))
But it throws up an error:
[Derived Column 2 [11]] Error: An error occurred while evaluating the function.
[Derived Column 2 [11]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "Derived Column 2" failed because error code 0xC0049067 occurred, and the error row disposition on "Derived Column 2.Inputs[Derived Column Input].Columns[ReadCode]" 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.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Derived Column 2" (11) failed with error code 0xC0209029 while processing input "Derived Column Input" (12). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure.
Can anyone help?