In Forms in Base I am trying to filter a table on a subform with a filter table on the form.
My filter query on the subform is :-
SELECT * FROM “WordsTable”
WHERE (UPPER(“English”) = UPPER(:EnglishFilter) OR :EnglishFilter IS NULL) AND
(UPPER(“Spanish”) = UPPER(:SpanishFilter) OR :SpanishFilter IS NULL) AND
(“Part of Speech” = :SpeechFilter OR :SpeechFilter IS NULL)
This works in SQL view in the query designer but if I go to design view I get as shown in the attachment QueryMess:
This gives the following SQL :-
SELECT * FROM “WordsTable” WHERE ( “Part of Speech” = :SpeechFilter AND UPPER ( “English” ) = UPPER ( :EnglishFilter ) AND UPPER ( “Spanish” ) = UPPER ( :SpanishFilter ) OR “Part of Speech” = :SpeechFilter AND UPPER ( “English” ) = UPPER ( :EnglishFilter ) AND :SpanishFilter IS NULL OR UPPER ( “English” ) = UPPER ( :EnglishFilter ) AND UPPER ( “Spanish” ) = UPPER ( :SpanishFilter ) AND :SpeechFilter IS NULL OR UPPER ( “English” ) = UPPER ( :EnglishFilter ) AND :SpanishFilter IS NULL AND :SpeechFilter IS NULL OR “Part of Speech” = :SpeechFilter AND UPPER ( “Spanish” ) = UPPER ( :SpanishFilter ) AND :EnglishFilter IS NULL OR “Part of Speech” = :SpeechFilter AND :SpanishFilter IS NULL AND :EnglishFilter IS NULL OR UPPER ( “Spanish” ) = UPPER ( :SpanishFilter ) AND :SpeechFilter IS NULL AND :EnglishFilter IS NULL OR :SpanishFilter IS NULL AND :SpeechFilter IS NULL AND :EnglishFilter IS NULL )
This also happens if I save the query in SQL view and then open it again.
If I run the query in Tools>SQL I get the following error :-
1: Assert failed: S0000 Direct execute with param count > 0java.lang.Exception
at org.hsqldb.Trace.getStackTrace(Unknown Source)
at org.hsqldb.Trace.doAssert(Unknown Source)
at org.hsqldb.DatabaseCommandInterpreter.executePart(Unknown Source)
at org.hsqldb.DatabaseCommandInterpreter.execute(Unknown Source)
at org.hsqldb.Session.sqlExecuteDirectNoPreChecks(Unknown Source)
at org.hsqldb.Session.execute(Unknown Source)
at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source)
at org.hsqldb.jdbc.jdbcStatement.execute(Unknown Source)
in statement [SELECT * FROM “WordsTable” WHERE ( UPPER ( “English” ) = UPPER ( :EnglishFilter ) OR :EnglishFilter IS NULL ) AND ( UPPER ( “Spanish” ) = UPPER ( :SpanishFilter ) OR :SpanishFilter IS NULL ) AND ( “Part of Speech” = :SpeechFilter OR :SpeechFilter IS NULL )]
I am running Linux Mint 19.1 LibreOfficeVersion: 6.0.7.3 with HSQLDB
I thought I had this working once but now I can’t get it to go.
(Edit: activated screenshot -AK)