Created attachment 192419 [details] Test both queries. Execute the queries in design mode. Open the attached database file. Execute both queries. Both will look the same. Open the query gui (Design Mode). Execute the query in design mode. qry_Lower won't be executed. An error appears: syntax error, unexpected $end, expecting BETWEEN or IN or SQL_TOKEN_LIKE at /home/buildslave/source/libo-core/dbaccess/source/core/api/SingleSelectQueryComposer.cxx:108 Seems design mode doesn't know anything about LOWER or interprets it wrong way. Bug appears in LO 24.2.0.3, but also in all earlier versions of LO. Tested here with OpenSUSE 15.4 64bit rpm Linux.
It seems the problem is not with LOWER which is executed correctly, but the problem is with the combination of LOWER...LIKE. To test it I have deleted the condition in LOWER and shown the filed, and the execution of LOWER is correct. When I add the LIKE condition again, then it don't works. ------------ Tested with: Version: 24.2.0.3 (X86_64) / LibreOffice Community Build ID: da48488a73ddd66ea24cf16bbc4f7b9c08e9bea1 CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win Locale: es-ES (es_ES); UI: es-ES Calc: CL threaded
I gave it a try with https://gerrit.libreoffice.org/c/core/+/163099 Lionel/Juan: I put you in reviewer/cc of the patch, don't hesitate to comment. I must recognize I don't understand why there were upper_lower/fold parts so perhaps I missed something.
Julien Nabet committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/9530664d07f400f4d8dcbe54d0e82d69168844de tdf#159588: Query-GUI: LOWER isnt supported in Query-GUI if condition is LIKE It will be available in 24.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
I pushed it but really not sure so don't hesitate to test. If there's something wrong happening, I'll revert it.