Seven Stars

## How to use StringHandling.LEN() function for integer column?

Hi Talend Folks,

I want know how to use StringHandling.LEN() function for integer column. I am facing error in below query. could please tell me?

StringHandling.LEN(row1.CARID)>2?0:1

Thanks
RAJ
1 ACCEPTED SOLUTION

Accepted Solutions
Seven Stars

## Re: How to use StringHandling.LEN() function for integer column?

Hi

Try to convert the integer value to string and use the length function.

Below is the function.

StringHandling.LEN(row1.newColumn.toString())

Thanks,

Bharath.

5 REPLIES
Highlighted
Ten Stars

## Re: How to use StringHandling.LEN() function for integer column?

StringHandling functions are for strings. What exactly are you trying to do?
Seven Stars

## Re: How to use StringHandling.LEN() function for integer column?

Dear

THANK YOU FOR IMMEDIATE RESPONSE

HOW TO FIND COLUMN VALUE LENGTH?

FOR EXAMPLE:

IF CARID Column VALUE LENGTH IS GREATER THAN 2 I NEED TO SET 0 ELSE I NEED TO SET 1

LEN(ROW1.CARID)>2 ? 0 : 1

Thanks
RAJ
Forteen Stars

## Re: How to use StringHandling.LEN() function for integer column?

Asking for Integer length doesn't make sense.
If ROW1.CARID is Integer datatype use this:
ROW1.CARID > 99 ? 0 : 1
If it's > 99, the length is > 2, isn't it?

TRF
Seven Stars

## Re: How to use StringHandling.LEN() function for integer column?

Hi

Try to convert the integer value to string and use the length function.

Below is the function.

StringHandling.LEN(row1.newColumn.toString())

Thanks,

Bharath.

Forteen Stars

## Re: How to use StringHandling.LEN() function for integer column?

A little expensive just to know if an Integer is greater to 99.
Doesn't it?

TRF