Hi everyone,
In MySQL DB the field row8.purchasing_price is recorded as DECIMAL(16,2)
In MySQL DB the field row10.php_to_myr is recorded as DECIMAL(16,6)
In Talend (in the tMap) the field row8.purchasing_price is recognized as a float and I set manually the type as BigDecimal
In Talend (in the tMap) the field row10.php_to_myr is recognized as a float and I set manually the type as BigDecimal
Theses codes below raise an error (cf. screenshot below)
code 1
code 2
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 row8.purchasing_price_currency.equals("PHP") ?row8.purchasing_price*row10.php_to_myr :System.out.println("ERROR purchasing price")
What can I do to multiply 2 BigDecimal (or float) ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 row8.purchasing_price_currency.equals("PHP") ?row8.purchasing_price.multiply(BigDecimal.valueOf(row10.php_to_myr)) :System.out.println("ERROR purchasing price")
Thank you for your advice.
Partager