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.
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.
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