LO/Firebird - subtraction issue and other operations

Creating tables and queries
Post Reply
pinco pallo
Posts: 89
Joined: Tue Jul 16, 2013 2:24 pm

LO/Firebird - subtraction issue and other operations

Post 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.
Last edited by pinco pallo on Wed Jul 10, 2019 5:01 pm, edited 1 time in total.
LiBO 6.2.8.2 on macOS 10.12.6 (Sierra)
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: LO/Firebird - subtraction issue

Post by RoryOF »

Your comma is not being treated as a decimal point.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
pinco pallo
Posts: 89
Joined: Tue Jul 16, 2013 2:24 pm

Re: LO/Firebird - subtraction issue

Post 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.
Attachments
Schermata 2019-07-10 alle 16.43.57.png
LiBO 6.2.8.2 on macOS 10.12.6 (Sierra)
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: LO/Firebird - subtraction issue and other operations

Post by Villeroy »

Test_Firebird.odb
(3.73 KiB) Downloaded 307 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
pinco pallo
Posts: 89
Joined: Tue Jul 16, 2013 2:24 pm

Re: LO/Firebird - subtraction issue and other operations

Post by pinco pallo »

Thank you. But not in MyTest:
Schermata 2019-07-11 alle 06.58.16.png
Where am I wrong?
Attachments
MyTest.odb
(3.51 KiB) Downloaded 282 times
LiBO 6.2.8.2 on macOS 10.12.6 (Sierra)
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: LO/Firebird - subtraction issue and other operations

Post by Villeroy »

Because your query is not the same as mine.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
chrisb
Posts: 298
Joined: Mon Jun 07, 2010 4:16 pm

Re: LO/Firebird - subtraction issue and other operations

Post 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

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.
open office 4.1.14 & LibreOffice 6.4.4.2 x64 using HSQL 1.8.0.10 (Embedded) and HSQL 2.6.0 (Split) on Windows 10
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: LO/Firebird - subtraction issue and other operations

Post 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.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
pinco pallo
Posts: 89
Joined: Tue Jul 16, 2013 2:24 pm

Re: LO/Firebird - subtraction issue and other operations

Post 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.
LiBO 6.2.8.2 on macOS 10.12.6 (Sierra)
pinco pallo
Posts: 89
Joined: Tue Jul 16, 2013 2:24 pm

Re: LO/Firebird - subtraction issue and other operations

Post by pinco pallo »

The problem also exists with a new database connected.
Is it possible that the developers have done this stupid thing?
LiBO 6.2.8.2 on macOS 10.12.6 (Sierra)
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: LO/Firebird - subtraction issue and other operations

Post 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.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply