Bug 126178 - FIREBIRD: Query with two fields with the same name couldn't be sorted
Summary: FIREBIRD: Query with two fields with the same name couldn't be sorted
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.3.0.0.beta2+
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Base-Without-Java
  Show dependency treegraph
 
Reported: 2019-07-01 15:27 UTC by Robert Großkopf
Modified: 2023-03-28 14:06 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Open the queries - the one with an alias will work, the other not (112.02 KB, application/vnd.oasis.opendocument.database)
2019-07-01 15:27 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2019-07-01 15:27:53 UTC
Created attachment 152488 [details]
Open the queries - the one with an alias will work, the other not

Open the attached database.
Open the query "Query_Ambiguous".
Query doesn't work, because the are two columns with the same name and the columns should be sorted by the name. Shows only an error.

This code has been created by the query-GUI:
SELECT "Forename", "Forename" FROM "Table1" ORDER BY "Forename" ASC

Same code will work in HSQLDB-queries in the GUI.

The query will work in Firebird only when setting an alias to one of the columns:
SELECT "Forename" "FName", "Forename" FROM "Table1" ORDER BY "FName" ASC

Could be this behaviour is a special Firebird behaviour. So it couldn't be fixed by LO.
Comment 1 Julien Nabet 2019-07-04 17:10:02 UTC
If running the request on Firebird on direct SQL gives the error, I'd say not a LO pb.
Anyway, even if it is, I can't help here.
Comment 2 Alex Thurgood 2019-07-05 07:48:34 UTC
Confirming with 

Version: 6.4.0.0.alpha0+
Build ID: 75d35ef8df1936dd93d5919b688abcaddb58bee8
CPU threads: 4; OS: Mac OS X 10.14.5; UI render: default; VCL: osx; 
Locale: fr-FR (fr_FR.UTF-8); UI-Language: en-US
Calc: threaded
Comment 3 QA Administrators 2021-07-19 03:26:31 UTC Comment hidden (obsolete)
Comment 4 Robert Großkopf 2021-07-19 05:21:30 UTC
Bug is still the same with LO 7.2.0.1 on OpenSUSE 15.2 64bit rpm Linux.