Bug 172545 - Switching from sql view to design view returns an error
Summary: Switching from sql view to design view returns an error
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Database-Queries
  Show dependency treegraph
 
Reported: 2026-06-22 11:43 UTC by Vissarion Fisikopoulos
Modified: 2026-08-03 07:11 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
example database (1.35 MB, application/vnd.oasis.opendocument.database)
2026-06-22 11:43 UTC, Vissarion Fisikopoulos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vissarion Fisikopoulos 2026-06-22 11:43:30 UTC
Created attachment 207511 [details]
example database

Open the attached database (or download from https://www.familiegrosskopf.de/robert/index.php?&Inhalt=xrechnung)

Click edit on qry_BerichtLieferungseingang_Aenderung query. Then try to either execute or switch to Design View on/off. Both return an error 
"SQL Status: S1000
Error code: 1000

SQL syntax error at /home/vissarion/workspace/libreoffice_master/dbaccess/source/ui/querydesign/querycontroller.cxx:567"

Note that if you open "Edit on SQL View" and the click execute the query is executed correctly.
Comment 1 Robert Großkopf 2026-06-22 19:00:15 UTC
It is this part of the query which produces the error:

AND EXTRACT( YEAR FROM "b"."Datum" ) = COALESCE ( ( SELECT "Jahr" FROM "viw_Filter" ), EXTRACT( YEAR FROM "b"."Datum" ) ) 
AND EXTRACT( MONTH FROM "b"."Datum" ) = COALESCE ( ( SELECT "Monat" FROM "viw_Filter" ), EXTRACT( MONTH FROM "b"."Datum" ) ) 
AND CEILING(EXTRACT(MONTH FROM "b"."Datum")/3.0) = COALESCE ( ( SELECT "Quartal" FROM "viw_Filter" ), CEILING(EXTRACT(MONTH FROM "b"."Datum")/3.0) )

Might be some parts of the functions aren't well integrated. Database for XRechnung is Firebird…

When switching to Design View and trying to execute the query I get:

at /home/buildslave/source/libo-core/dbaccess/source/core/api/SingleSelectQueryComposer.cxx:109

When trying to go back to SQL view I get

/home/buildslave/source/libo-core/dbaccess/source/ui/querydesign/querycontroller.cxx:524

I have tested this with LO 7.4.7.2. So the errors might be different. IN LO 26.2.4.2 and error without any information appears.
Comment 2 Robert Großkopf 2026-08-03 07:11:50 UTC
Could reproduce this bug with a query, which uses COALESCE without any subselect. Bug appears with internal HSQLDB and internal FIREBIRD.

Tested also IFNULL in HSQLDB. Same buggy behavior.

See attachments for bug 172981