Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I extract my data in type String and I need to store them in database as numeric. The data contains decimal numbers and NULL.
For decimal numbers, I need to round up the values to the nearest integer. For example, 4.3145 will be 4 and for NULL i need it to show as NULL in database.
I tried to use Math.Round() function in tMap as below but it throws an error -
I searched and found out that Math.Round() won't work for a nullable Double 😞
Can anyone suggest a way that i can round up the decimal numbers and also load the NULL values in database?
@Syaheerah Radzi ,check the below link. you need to write tjava
https://www.tutorialspoint.com/java/lang/math_round_double.htm
Thanks,
Manohar
Hi SR2210,
You could achieve this even by using tConverttype component, please go through below link:
https://help.talend.com/reader/mjoDghHoMPI0yuyZ83a13Q/7wzgYBYjU0kmyizKfM_7Gw