Page 1 of 1

Substring Issue

Posted: Thu Nov 08, 2007 6:12 am
by irajasekharhexa
Hi,

In the Transformation derivation
I taken SourceAccountId[9, 14] derivation.

Input data is '123456789ABCDFGHIJKLMNOP'

I am getting the out put as 9ABCDFGH

Is datastage counts the position of the character from 0 to or 1

Even if the datastage counts the position from 0 it should give the output data as
ABCDFG

Then why Iam getting the different ouput?

Can any body tell how exactly it's working?

Posted: Thu Nov 08, 2007 6:30 am
by irajasekharhexa
Ok I understood that datastage counts the firstchar from count 1 but it should give only till 14 th character as the derivation is[9,14] but why it is picking till 16th character?

Posted: Thu Nov 08, 2007 7:03 am
by chulett
The second value is the substring length to pull, not the ending character position - something a quick check of the documentation would have revealed. :wink: