[Libreoffice-bugs] [Bug 107457] New: Subforms: Connecting to a field created by a function fails - wrong SQL-Code

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed Apr 26 19:32:18 UTC 2017


https://bugs.documentfoundation.org/show_bug.cgi?id=107457

            Bug ID: 107457
           Summary: Subforms: Connecting to a field created by a function
                    fails - wrong SQL-Code
           Product: LibreOffice
           Version: 5.0.0.5 release
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Base
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: robert at familiegrosskopf.de

Created attachment 132872
  --> https://bugs.documentfoundation.org/attachment.cgi?id=132872&action=edit
Open the form and have a look at the SQL-error. Appears since LO 5.*

Open the attached database.
Open the form.
An SQL-error appears.
Let you show the details of the error. It gives the following code:

SELECT "ID", "Text", "DateStart", "DateEnd", YEAR( "DateStart" ) AS
"YearStart", YEAR( "DateEnd" ) AS "YearEnd" FROM "Table" WHERE ( "YEAR(
"DateStart" )" = :link_from_YearStart ) AND ( "YEAR( "DateEnd" )" =
:link_from_YearEnd )

The query uses the function YEAR. The code after WHERE is wrong. There are
double-quotes added around function and fieldname. Must be YEAR( "DateStart" ),
not "YEAR( "DateStart" )"

The form will work right in LO 4.4.7.2
Fails first here with LO 5.0.0.5
Both tested with OpenSUSE 42.1 64bit rpm Linux.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20170426/5278d9c0/attachment-0001.html>


More information about the Libreoffice-bugs mailing list