Hi,
I'm trying to do a lookup on an incoming column which is string and the column from the lookup file is also a string.
The transformation on the main column is as follows which is applied while doing the lookup.
StringHandling.LEFT(row1.main_column,2)
The error thrown is
Cannot convert from char to string. I tried using the valueof method as well but no luck.
Any ideas please?
Thanks
Thank you for the response.
The issue was apparently not being caused by the substring function but actually an empty string that was being passed to a column in the tmap. Instead of using double quotes, single quote was used and hence the cryptic error message
.
Thanks again.
Can you take a screenshot of your job and the tMap that you are carrying out this logic in? It seems an odd message for what you have described. Also, could you click on the "code" tab (in the bottom left of the Talend workspace) and look for a red block on the right hand side of the code window. Click on that to take you to the area of broken code. Take a screenshot of that and post it. That should give us enough information to help you. You may struggle to post screen shots as you have not posted enough. Just post a couple of comments under this message to get you up to 10 posts, then you will be able to post images.
Thank you for the response.
The issue was apparently not being caused by the substring function but actually an empty string that was being passed to a column in the tmap. Instead of using double quotes, single quote was used and hence the cryptic error message
.
Thanks again.