Page 1 of 1

Substr issue

Posted: Mon Nov 21, 2011 10:49 pm
by dubuku_01
Hi all,

My input column contains year,month and week value like 2011014. Where first 4 characters correspond to the year and second 2 characters correspond to month and the seventh character correspond to the week.

In transformer, am using function like this to extract month value.

year_month_week_id[5,2] and am getting value as 1. But i want the value to be 01. I changed the scale in the transformer to be 2. But still the same issue.
Anyone please throw some light on this.


Thanks in advance,

Posted: Mon Nov 21, 2011 11:00 pm
by chulett
Target needs to be a string if you want to preserve the leading zero.

Re: Substr issue

Posted: Tue Nov 22, 2011 8:24 am
by sathishmca
What is your target ?

just try with Varchar target field.