SUM in Firebird Embedded

Hi.
I know this is a question about Firebird, not about Base proper, but anyway…


 
Both parsed and direct mode.
SELECT * FROM MOVIMENTO
runs :ok:
[VALOR] = NUMERIC(8, 2)
 
Version: 25.8.3.2 (X86_64) / LibreOffice Community
Build ID: 580(Build:2)
CPU threads: 2; OS: Linux 6.17; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Ubuntu package version: 4:25.8.3-0ubuntu0.25.10.1
 
Any suggestions?
Thanks in advance.

You could see all data when switching to the tables pane?
Have read about problems with newer packages of Ubuntu/Debian, because the distributions try to connect to the internal Firebird database with Firebird 4, not Firebird 3. Packages, downloaded from LibreOffice directly, helped here.
SELECT SUM( "Preis" ) AS "SumValue" FROM "tbl_Ausgang"
will run here without any problem. “Preis” is DECIMAL(12,6) here.

Yes, I can.
And also SELECT * runs :ok:
 
And this LO Base I installed via apt today.
This is an old machine I needed to format, and installed 25.10 now.

Then it seems like “VALOR” isn’t recognized as NUMERIC(8,2). Might be the result is bigger than NUMERIC(8,2)?
Try
SELECT SUM(CAST("VALOR" AS NUMERIC(10,2))) AS "TM" FROM "MOVIMENTO"

Typo of mine:
EstruturaMovimento
 
MOVIMENTO

Have tested this - without any problem when setting a column to NUMERIC(18,2) or NUMERIC(8,2). SUM will be executed right way.

I would test the original packages from LO, not from Ubuntu.

Yes: :ok:
This is not important.
This, where I am now, is an old laptop I had to format.
So installed 25.10;
and Base via apt;
and Java;
and just did a test;
and… :frowning_face:

MariaDB – same table:
 
SUM_movimento

What happens with other aggregations? AVG("valor"),MIN("valor"),MAX("valor"),COUNT("valor")
I can’t reproduce the problem with any of my Firebird databases.
Can you upload your document?

Simulacrum.odb (3.5 KB)
Query1
 

Bildschirmfoto vom 2026-01-09 23-36-25
Version: 25.8.4.2 (X86_64)
Build ID: 290daaa01b999472f0c7a3890eb6a550fd74c6df
CPU threads: 4; OS: Linux 6.12; UI render: Skia/Raster; VCL: x11
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded

:exclamation:
I formatted this (where I am now) machine and as Ubuntu’s LO does not come with Base, installed it today via sudo apt […]
And as you can see, it does connect here.
 
But :ok: : it is not important.
This table is from a simulacrum I did of old style posted monthly bank statements.
And yes: it works in another Embedded install.
But here the goal was only to check Base + Java + Report Builder installs after formatting this old “stand-by” machine.

See my first comment: Ubuntu (and all deb-versions) packed LibreOffice to work with Firebird 4.0, but the version of LibreOffice is 3.0. Backup version 11 is a version of Firebird 4.

Error here on OpenSUSE with original packages is the same as reported by @Villeroy

If you want to use base don’t use the LO-versions, which are packed by the distributions. There are often special bugs (with Firebird, ReportBuilder …) which won’t appear in the original packages of LibreOffice.

1 Like

So in this case I should:

  1. sudo apt purge libreoffice-base && […]
  2. sudo snap remove libreoffice
  3. LO Site > download .deb
  4. sudo dpkg -i *.deb

And as a general rule whenever installing Ubuntu, steps 2 - 3 - 4.
That’s it?

You might need to also check whether Ubuntu separately installs an incorrect version of Firebird, which it then hooks (but doesn’t enforce dependency on) to the apt LO packages.

tdf#168143

And how one does this?
Because after

sudo apt purge libreoffice-base && sudo apt autoremove

need to check if there are no remains of “Ubuntu’s” Firebird left behind. Right?

@CRDF : Try installing parallel: Installing in parallel/Linux - The Document Foundation Wiki
Have installed many versions here this way (for *.rpm). No problem running Firebird there with any function, which is supported through LO driver. Linux distributions won’t install the driver from LO. It isn’t only a problem of “function not working”. You couldn’t open the database on other systems where LO Base expects Firebird 3, not Firebird 4.

No… things being as you all inform here they are, better get rid of Ubuntu’s packages.
So:

cd Downloads
tar -vxzf downloaded_file_from_LO_Site
cd created_directory/DEBS
mkdir aux
cd aux
for i in ../*.deb; do dpkg-deb -x $i . ; done

This?

When extracted the tar.gz files there will be *.deb files in a separate folder. All the deb-files could be moved to a separate folder. In this folder should be another folder for the installation. Seems you called it “aux”. There you could start for in in … and will get the complete installation of LO as a normal user, not a super user.