Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Folks,
I have an input file in that the variable data is like below,
3038604370221.23
In tMap, the mapping is like below, and for the variable ACCT_LEVEL_1 I want to transform to remove the decimal point. And keep the number as 3038604370221. But when I run the expression like below I am receiving the error as
'java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(Unknown Source)
at routines.StringHandling.LEFT(StringHandling.java:229)'
Expression:
StringHandling.LEFT(row1.ACCT_LEVEL_1,StringHandling.INDEX(row1.ACCT_LEVEL_1,"."))
Do all values of ACCT_LEVEL_1 contain a decimal point? If not you will receive this error as StringHandling.INDEX will return -1 if the value is not found.
Hello,
What about something like this?
Regards
lojdr