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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

int to bigdecimal

hello,
i have a process where i need to map int to bigdecimal column.
i have this function Numeric.sequence("TRAB_SEQUENCE",context.last_id,1) in expression builder and type bigdecimal
but i have this error
"type mismatch: cannot convert from integer to bigdecimal"
when changed the type to "int" i had the same error because the output column is Bigdecimal.
how can i fixed that?
thanks in advance
RT
Labels (2)
2 Replies
Anonymous
Not applicable

You have to create a BigDecimal value from the value returned by Numeric.sequence, which is an int.
I think this will work:
new BigDecimal(Numeric.sequence("TRAB_SEQUENCE",context.last_id,1))
new creates a variable of type BigDecimal, and it is set to the value returned from your call to sequence.
_AnonymousUser
Specialist III
Specialist III
Author

You have to create a BigDecimal value from the value returned by Numeric.sequence, which is an int.
I think this will work:
new BigDecimal(Numeric.sequence("TRAB_SEQUENCE",context.last_id,1))
new creates a variable of type BigDecimal, and it is set to the value returned from your call to sequence.

you are the Best. thanks a lot
RT