Page 1 of 1

LO/Firebird - subtraction issue and other operations

PostPosted: Wed Jul 10, 2019 4:31 pm
by pinco pallo
Hi, I have an issue with an embedded Firebird database with LO 6.2.
In my table one is decimal =12,0 and two is decimal=10,0.
Why the subtraction one-two = 20?
Why the additions one+two = 220?
Why the division one/two = 120?
Why the product one*two = 12000?
Thanks so much.

Re: LO/Firebird - subtraction issue

PostPosted: Wed Jul 10, 2019 4:36 pm
by RoryOF
Your comma is not being treated as a decimal point.

Re: LO/Firebird - subtraction issue

PostPosted: Wed Jul 10, 2019 4:43 pm
by pinco pallo
Thanks for your quick reply.
But even changing the decimal separator from comma to point (choosing English in the Format dialog box) things don't change.

Re: LO/Firebird - subtraction issue and other operations

PostPosted: Wed Jul 10, 2019 9:57 pm
by Villeroy
Test_Firebird.odb
(3.73 KiB) Downloaded 34 times

Re: LO/Firebird - subtraction issue and other operations

PostPosted: Thu Jul 11, 2019 7:01 am
by pinco pallo
Thank you. But not in MyTest:
Schermata 2019-07-11 alle 06.58.16.png

Where am I wrong?

Re: LO/Firebird - subtraction issue and other operations

PostPosted: Thu Jul 11, 2019 1:41 pm
by Villeroy
Because your query is not the same as mine.

Re: LO/Firebird - subtraction issue and other operations

PostPosted: Thu Jul 11, 2019 1:46 pm
by chrisb
i have not downloaded any of the attachments related to this topic but suspect that the answer lies here>> https://ask.libreoffice.org/en/question ... breoffice/
the use of CAST is required:-
Code: Select all   Expand viewCollapse view
cast("Column1" - "Column2" as decimal(8,2)) "Column1-Column2"
in my humble opinion there are currently so many bugs in libreoffice base & embedded firebird in particular that it can not be trusted.

Re: LO/Firebird - subtraction issue and other operations

PostPosted: Thu Jul 11, 2019 1:56 pm
by Villeroy
+1

Use LibreOffice instead of OpenOffice but not the new Firebird engine that integrates so poorly. I do not blame anybody. It could be Firebird not obeying certain standards, it could be the Base developers of old OpenOffice.org, it could be the LibreOffice crew. There is nothing wrong with HSQL. Even the old embedded version works better than Firebird, and if you switch from embedded HSQL to external HSQL2 you get a really nice backend playing almost perfectly together with Base.

Re: LO/Firebird - subtraction issue and other operations

PostPosted: Thu Jul 11, 2019 2:28 pm
by pinco pallo
Villeroy wrote:but not the new Firebird engine that integrates so poorly

I thought I was doing something right with Firebird. If I select HSQL LO it says:
Schermata 2019-07-11 alle 14.20.43.png

chrisb wrote:the use of CAST is required

Better to give up immediately if I need to reformat the fields in all the queries.

Re: LO/Firebird - subtraction issue and other operations

PostPosted: Thu Jul 11, 2019 2:49 pm
by pinco pallo
The problem also exists with a new database connected.
Is it possible that the developers have done this stupid thing?

Re: LO/Firebird - subtraction issue and other operations

PostPosted: Thu Jul 11, 2019 4:29 pm
by Villeroy
Yes, they did this stupid thing.
menu:Tools>Options>Advanced turn off experimental features and you won't be prompted for conversion anymore.