Re: how to retrieve a number with more dec places

2017-02-28 Thread Bob M
Hi everybody My apologies(very red face) The prices I was saving in my table were only to 3 decimals My bad :( Bob M -- View this message in context: http://apache-database.10148.n7.nabble.com/how-to-retrieve-a-number-with-more-dec-places-tp147257p147264.html Sent from the

Re: how to retrieve a number with more dec places

2017-02-28 Thread Bob M
Hi John I write the price out to a file I wish to do simple maths e.g. subtracting one price from a second price and I need to be using all dec. places At the moment my subtraction often results in zero because of the curtailed prices When I view my Apachy table using Netbeans IDE I see the

Re: how to retrieve a number with more dec places

2017-02-28 Thread John English
On 28/02/2017 08:03, Bob M wrote: Hi I have a derby database with records that contain a price e.g. 1.21098 I retrieve it by the following line price = rs.getDouble("price"); when I print it out I get :- 1.21 How are you printing it out? The problem is probably there, not with the data

Re: how to retrieve a number with more dec places

2017-02-28 Thread Bob M
Hi I haven't tried BigDecimal To do that, what do you change the following to.. private double price = 0; Bob M -- View this message in context: http://apache-database.10148.n7.nabble.com/how-to-retrieve-a-number-with-more-dec-places-tp147257p147259.html Sent from the Apache