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

--- Comment #1 from Hossein <hoss...@libreoffice.org> ---
Here is the suggested path to fix the issues:

If you open the created query using "Edit in SQL View...", you will see this:

SELECT "Table1"."a" "a", "Table2"."a" "a" FROM "Table1", "Table2" ORDER BY "a"
ASC, "a" ASC

If you choose a and b for the alias of the two fields, it becomes:

SELECT "Table1"."a" "a", "Table2"."a" "b" FROM "Table1" "Table1", "Table2"
"Table2" ORDER BY "a", "a"

which is wrong.

If you change it to the below SQL query, it should work correctly:

SELECT "Table1"."a", "Table2"."a" FROM "Table1", "Table2" ORDER BY
"Table1"."a", "Table2"."a"

Even in this case, the title of the both columns are "a", and does not show
anything about the table name. This is an issue.

Also, this one should work:

SELECT "Table1"."a" "a", "Table2"."a" "b" FROM "Table1" "Table1", "Table2"
"Table2" ORDER BY "a", "b"

An implementation path could be making sure that the correct alias is used, and
also to avoid using duplicate aliases by prefixing table names when needed. In
this way, the column display would be also fixed.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to