Ask Your Question

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

asked 2020-10-03 13:12:38 +0100

greb gravatar image


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!

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2020-10-03 16:06:27 +0100

keme gravatar image

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

edit flag offensive delete link more


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

greb gravatar imagegreb ( 2020-10-03 19:11:39 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2020-10-03 13:12:38 +0100

Seen: 42 times

Last updated: Oct 03 '20