https://bugs.freedesktop.org/show_bug.cgi?id=58644

          Priority: medium
            Bug ID: 58644
          Assignee: libreoffice-bugs@lists.freedesktop.org
           Summary: EDITING: Auto-Filter removes brackets in Queries -
                    Filter doesen't work in correlated Subqueries
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: rob...@familiegrosskopf.de
          Hardware: Other
            Status: UNCONFIRMED
           Version: 3.3.4 release
         Component: Database
           Product: LibreOffice

Created attachment 71964
  --> https://bugs.freedesktop.org/attachment.cgi?id=71964&action=edit
Two queries. One works with autofilter in every field, the other doesn't work
in the subquery.

Create a query with a correlating subquery. 
I have made this in the attachment:
SELECT "ID", "Revenue", "Expense", ( SELECT SUM( "Revenue" ) - SUM( "Expense" )
FROM "Checkout" WHERE "ID" <= "a"."ID" ) AS "Balance" FROM "Checkout" AS "a"
Set autofilter for some fields.
Autofilter works with all fields, except the correlating subquery. It fails in
the subquery with 
SELECT "ID", "Revenue", "Expense", ( SELECT SUM( "Revenue" ) - SUM( "Expense" )
FROM "Checkout" WHERE "ID" <= "a"."ID" ) AS "Balance" FROM "Checkout" AS "a"
WHERE SELECT SUM( "Revenue" ) - SUM( "Expense" ) FROM "Checkout" WHERE "ID" <=
"a"."ID" = 12.50 ORDER BY "ID" ASC
The brackets around the subquery were removed.
If you set two brackets before and after the subquery, only one bracket is
removed and the autofilter works.
SELECT "ID", "Revenue", "Expense", (( SELECT SUM( "Revenue" ) - SUM( "Expense"
) FROM "Checkout" WHERE "ID" <= "a"."ID" )) AS "Balance" FROM "Checkout" AS "a"
works as expected for setting a filter to the subquery.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to