Le 07/09/11 18:34, John Mullen a écrit :
Hi John,
>
>
> SELECT 1.00, "CONTRACTS.Rental" FROM "CONTRACTS"
>
> this returns 1.00150
>
> Any idea why?
OK, I tested further and this is IMHO a bug.
With SQL preprocessing on, i.e. the default LibO behaviour, if your
decimal has figures afte
Le 07/09/11 18:34, John Mullen a écrit :
Hi John,
>
>
> SELECT 1.00, "CONTRACTS.Rental" FROM "CONTRACTS"
>
> this returns 1.00150
>
> Any idea why?
>
IMHO, this could be either a bug in the LibO SQL parser, or maybe the
TYPE converter (jni_uno2java.cxx type converter that handles conv
Sorry Planas, perhaps I have not explained clearly.
I do not want the ID column ( it had to be included to allow me to enter
data into the Rental column).
The example I gave was to show that if I did a select on the decimal field
only it displayed as a decimal
but if I preceded the decimal field
On Wed, 2011-09-07 at 17:34 +0100, John Mullen wrote:
> This gets weirder.
>
> Try this:Create a table CONTRACTS with an INTEGER field (ID) as a
> Primary key, set to auto fill
> and a decimal field (Rental) set to 2 decimal places.
>
> Add the value 150.00 to the first row.
>
> Run the
This gets weirder.
Try this:Create a table CONTRACTS with an INTEGER field (ID) as a
Primary key, set to auto fill
and a decimal field (Rental) set to 2 decimal places.
Add the value 150.00 to the first row.
Run the query
SELECT "CONTRACTS"."Rental" FROM "CONTRACTS"
this returns 150.00
Steve Edmonds wrote:
>
> Hi.
>>From the original posters example, he has decimal places, just not
> trailing zeros. I think the calculation is correct just the display of
> the result needs formatting. I don't use Base (yet) but is the correct
> data type for currency DECIMAL. Can the field displ
Hi.
>From the original posters example, he has decimal places, just not
trailing zeros. I think the calculation is correct just the display of
the result needs formatting. I don't use Base (yet) but is the correct
data type for currency DECIMAL. Can the field display format be set by
right clicking
Hi Andreas,
adding the .00 to the divisor seems to screw up the result of the ABS
function
i,e, 13 days overdue = 1 week when dividing by 7
= 1.86 weeks when dividing by 7.00
regards
John
On 6 September 2011 16:58, Andreas Säger wrote:
> Dividing an integer
Dividing an integer by another integer returns an integer.
Try this one:
ABS( DATEDIFF( 'dd', "RENT_PAYMENTS"."Date_Paid", CURDATE( ) ) / 7.00 )
--
View this message in context:
http://nabble.documentfoundation.org/Calculated-fields-not-showing-decimal-places-in-BASE-query-tp3313752p3313940.h