Many space characters in text field alias in query - Base Firebird embedded

Hello,

I’m struggling with a probably very basic problem…:

In a Firebird embedded database file, when I compute for example the following query :

SELECT 'test' as "test", "table1".* FROM "table1"

The result is indeed a first column named “test” with all records having ‘test’ value, and the columns from “table1” (one “id” and one “surname” fields).

Howewer, and this is the point, the computed ‘test’ value is in fact 'test ', ie ‘test’ with many spaces…

It is very embarrassing as I cannot easily then deal with proper formulations in subsequent queries, report, etc.

I attach the database file example here

Note: I’ve tried before in a HSQLB embedded database file, and it seems to not produce the problem.
Is it so a bug from Firebird integration in LibreOffice?
And how to overpass it while staying working with a Firebird embedded file (which is the unique option I have)?

Many thanks in advance for any help!

TRIM() may be useful. See this help page for Firebird.

Thanks a lot kerne !
This worked perfectly and resolved my problem. I should have searched better in the Firebird documentation…