One Star

Unresolved Compilation Problems with Left and Right String Handling

Hi,
I am trying to use the LEFT and RIGHT String Handling methods within the tMap component to do some very simple string manipulation but the expression builder always throws a red flag when I actually try to test the expression.
When I try testing this expression with 20120403 as a value:
StringHandling.LEFT(row1.TransactionDate,4)
I get an error message saying:
Exception in thread "main" java.lang.Error: Unresolved compilation problems: '
All I'm doing is passing a variable into the expression and trying to get the left 4 characters. Why is it have errors? How can I get this to work?
Thanks
5 REPLIES
One Star

Re: Unresolved Compilation Problems with Left and Right String Handling

Hi
Could you show us the screenshot of tMap?
Or click 'Code' tag in Job Design area. Show us the line with red underline.
Regards,
Pedro
One Star

Re: Unresolved Compilation Problems with Left and Right String Handling

Tests inn expression builder often come back with an error. Click on the code tab to see if there is a real error. If not the job should run ok.
One Star

Re: Unresolved Compilation Problems with Left and Right String Handling

With out screen Shot i am feeling like you are declaring the value as a date and not as a string....check the data type in the tmap and confirm...if it is date then change to string

Thanks,
Debashis
One Star

Re: Unresolved Compilation Problems with Left and Right String Handling

Hi,
TransactionDate field data type is Date or string.
Thanks,
kumar
One Star

Re: Unresolved Compilation Problems with Left and Right String Handling

Hi
see for any date the data type will be date only but if you want to do string handling to that one you need to treat that one as a string right...when you do a string handling with a date field it will show you unresolved compilation error...