I'm using the following expression in the Derived Column Transformation Editor in SSIS
LEN([AD Location]) - ((FINDSTRING([AD Location],"DC=",3) + 6)) - (FINDSTRING([AD Location],"DC=",1)))
The expression is typically fed the following
the number of OU entries may vary....
What Iexpect the code to do is return a string such as "OU=Remote,OU=Users,OU=Partners" essentially stripping everything from the first "DC=" to the end....
The code above parses ok but when I run the package I get the following error;
[Derived Column ] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "component "Derived Column" (637)" failed because error code 0xC0049067 occurred, and the error row disposition on "output column "OU2" (826)" 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.
Any advice appreciated, thanks