
Anonymous
Not applicable
2015-09-11
09:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
412 Views
2 Replies

Anonymous
Not applicable
2015-09-16
03:43 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
412 Views

Anonymous
Not applicable
2015-09-16
04:31 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
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
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
412 Views
