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: 
rohit1804
Contributor III
Contributor III

how to use compareTo in tmap. Getting error while converting int to bigdecimal

Hi,

I am getting an error while converting int to bigdecimal so am not able to use compareTo operator. Please help  to get rid of it. Please refer below e.g.

row1.Dest_NBR.compareTo(BigDicimal(-1))
Error : The method BigDecimal(int) is undefined for the type

 

Labels (1)
1 Solution

Accepted Solutions
manodwhb
Champion II
Champion II

@rohit1804 ,if row1.Dest_NBR  column is big decimal then it will work below way to filter the data.

 

 

row1.Dest_NBR==new BigDecimal("-1")

 

if is it sting means convert below way.

 

new BigDecimal(row1.Dest_NBR.equals("-1))

View solution in original post

2 Replies
manodwhb
Champion II
Champion II

@rohit1804 ,what is the data type of row1.Dest_NBR column?

manodwhb
Champion II
Champion II

@rohit1804 ,if row1.Dest_NBR  column is big decimal then it will work below way to filter the data.

 

 

row1.Dest_NBR==new BigDecimal("-1")

 

if is it sting means convert below way.

 

new BigDecimal(row1.Dest_NBR.equals("-1))