Page 1 of 1

Substring of unknown length

Posted: Tue Dec 01, 2015 1:33 pm
by sam334
Hi all, Need a help in Substring of a value.

We have a column ID:- 1111111111AB01, 2222222222ABCD02, 2121212121ADBC01.

So its a 10 digits length of ID then character. I have (11,4) in transformer to get the character such as AB,ABCD,ADBC.

Now issue is, ID length may change, it could be 11 digit or could be 10 digit. So (11,4) wont work. Any other advice how we could achieve this..

Primary goal is to get the character (AB/ABCD/ADBC) out from the string.

Posted: Tue Dec 01, 2015 1:39 pm
by chulett
Sounds like the "double convert" would work for you. One such example is here.

Posted: Tue Dec 01, 2015 2:42 pm
by sam334
Perfect. Thanks a lot Craig.