One Star

Taype mismatch : cannot convert fron int to String

Hello everybody,
I m just facing a small issue in my project : I should update an output row defined as String with an input value defind as int.
I guess I should use the Expression builder but I cannot find out the correct syntax.
Some one can hel me ?
Many thanks in advance.
I'm running Talend V 2.2 project in Java 1.6..
4 REPLIES
Community Manager

Re: Taype mismatch : cannot convert fron int to String

Hi
Convert int to string like this:
String.valueOf(row1.int)

Best regards
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Taype mismatch : cannot convert fron int to String

Hi Shong,
Many thanks. :-)
Four Stars

Re: Taype mismatch : cannot convert fron int to String

Hi,
I have to do the contrary : a conversion from String to Int.
So i tried the function StringToInt but i have a message saying that the method is undefined. Could you give me the right syntax please ?
thanks in advance
One Star

Re: Taype mismatch : cannot convert fron int to String

Hello,
you should try the following code:
Integer.parseInt(row1.stringColumn);

Bye
Volker