Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
RAJ6
Contributor III
Contributor III

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

Labels (3)
1 Solution

Accepted Solutions
javvaji
Creator II
Creator II

Hi RAJESH_GJ,

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

Below is the function.

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

 

 

Thanks,

Bharath.

 

View solution in original post

5 Replies
cterenzi
Specialist
Specialist

StringHandling functions are for strings. What exactly are you trying to do?
RAJ6
Contributor III
Contributor III
Author

Dear cterenzi,

 

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

 

TRF
Champion II
Champion II

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?
javvaji
Creator II
Creator II

Hi RAJESH_GJ,

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

Below is the function.

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

 

 

Thanks,

Bharath.

 

TRF
Champion II
Champion II

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