Skip to main content
Announcements
A fresh, new look for the Data Integration & Quality forums and navigation! Read more about what's changed.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

insert BigDecimal into table

I am trying to insert BigDecimal into table. But the value which get inserted in table has precision value 4.
The value which should get inserted is like 49.5365 but the value get inserted is 49.5400. Can you please help me out.
The table has a column with datatype as Number(16,4).
I dont want to change table structure.

Labels (2)
2 Replies
Anonymous
Not applicable
Author

Hi,

Could you please show us your screenshot of schema setting in DB component? What's DB type you are using? Does this issue repro on other studio?
Best regards
Sabrina
Anonymous
Not applicable
Author

hi all,

some precision about BigDecimal. It's a java Object.
It's the only type in java to manipulate decimal with no loosing 'precision'.
So it's not a problem from your type in table (except if you try to insert decimal into integer 0683p000009MA9p.png

Have a llok about this java Object at
http://docs.oracle.com/javase/7/docs/api/java/math/BigDecimal.html
espacially about roundingmode : http://docs.oracle.com/javase/7/docs/api/java/math/RoundingMode.html


an example on stackoverflow  :  http://stackoverflow.com/questions/3843440/bigdecimal-setscale-and-round

regards
laurent