https://bugs.documentfoundation.org/show_bug.cgi?id=104095
Bug ID: 104095
Summary: Report wizard's grouping function unable to handle
duplicate column names
Product: LibreOffice
Version: 5.1.4.2 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Base
Assignee: [email protected]
Reporter: [email protected]
When I use the wizard to generate a report based on the query below
SELECT "a"."datum", "p"."naam", "b"."naam", "a"."uitleg", "type"."naam",
"det"."aantal", "materiaalkosten", "arbeidskosten", "det"."uitleg" FROM
"onderhoudsactiviteit_boot" "a" LEFT JOIN "persoon" "p" ON "p"."id" =
"a"."persoon_id" LEFT JOIN "boot" "b" ON "b"."id" = "a"."boot_id" LEFT JOIN
"onderhoudsdetail_boot" "det" ON "det"."onderhoudsactiviteit_boot_id" =
"a"."id" LEFT JOIN "onderdeeltype_boot" "type" ON "type"."id" =
"det"."onderdeeltype_boot_id" WHERE "a"."datum" >= '2016-07-01 00:00:00' AND
"a"."datum" < '2017-07-01 00:00:00'
it gives the following error message:
The query with the statement
'SELECT "a"."datum", "p"."naam", "b"."naam", "a"."uitleg", "type"."naam",
"det"."aantal", "materiaalkosten", "arbeidskosten", "det"."uitleg" FROM
"onderhoudsactiviteit_boot" "a" LEFT JOIN "persoon" "p" ON "p"."id" =
"a"."persoon_id" LEFT JOIN "boot" "b" ON "b"."id" = "a"."boot_id" LEFT JOIN
"onderhoudsdetail_boot" "det" ON "det"."onderhoudsactiviteit_boot_id" =
"a"."id" LEFT JOIN "onderdeeltype_boot" "type" ON "type"."id" =
"det"."onderdeeltype_boot_id" WHERE "a"."datum" >= '2016-07-01 00:00:00' AND
"a"."datum" < '2017-07-01 00:00:00' ORDER BY "datum", "naam", "naam1"'
could not be run.
Check your data source.
What happens is, that the wizard adds ORDER BY "groupingcolumn1",
"groupingcolumn2", etc. But as I am using columns with the same name but from
different tables, the wizard adds decides to add a "1" to the end of the
duplicate column name. Then it tries to order the results by a column name that
does not exist.
I think that the wizard should not use 'made-up' column names to generate SQL
code. Instead it should have used the real addresses of the columns. (In this
case "persoon"."naam" and "boot"."naam"
--
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