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: [email protected]
          Reporter: [email protected]

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.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to