Trying to set up an SSIS derived column in BIDS 2008. I have a single-column input [Column 0] which contains a pipe-delimited string. I need a formula to extract one of the "fields" from the input column, however the length is variable. Here is the formula I currently have in place:
SUBSTRING( [Column 0],(FINDSTRING( [Column 0], "|",10 )+1),(FINDSTRING( [Column 0], "|",11)-FINDSTRING( [Column 0],"|",10)-1))
When I enter that formula, it turns red and says the length parameter is invalid. Trying to determine length of the data by finding the position of the next iteration of the delimiter and then subtracting from the position of the current iteration of the delimiter.
When I replace the length part of the formula with a static number the error goes away.
Can someone help me correct the formula above please? Thank you!