cancel
Showing results for 
Search instead for 
Did you mean: 

String or Float variable for calculations

Former Member
0 Kudos

Hi All,

What is right to use string or float for storing decimals and performing operations on them?

Regards,

XIer

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Use string and do your mapping. When you are doing airthmetic operations then if you are using UDF then I would suggest to use BigDecimal otherwise on few occassions you will not have correct value in the output. Also check this weblog:

/people/thorsten.nordholmsbirk/blog/2006/04/03/never-ever-use-xis-built-in-arithmetic-functions

Regards,

---Satish

Answers (1)

Answers (1)

justin_santhanam
Active Contributor
0 Kudos

XIer,

The best option is to store in String format and do the validations in mapping by converting them to ur reqd format.

Best regards,

raj.