Issue 67008

Summary: creating a query based on another query with non-unique column names fails
Product: Base Reporter: Frank Schönheit <frank.schoenheit>
Component: codeAssignee: AOO issues mailing list <issues>
Status: ACCEPTED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues
Version: recent-trunk   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Description Flags
document to reproduce the bug case none

Description Frank Schönheit 2006-07-04 14:06:19 UTC
This bug exists in the implementation of "Queries in Queries", filed as issue
51143. It can be reproduced in the master builds as soon as CWS qiq
( is
- open the attached database document
- with the query wizard, create a query based on the query "non-unique column
  names", adding all fields
- open the resulting query
=> error message saying that the data content could not be loaded.

The problem here is that the existing query selects column "Name" twice. When
executed directly, OOo makes the names unique, by naming on of them "Name1"
instead. The query wizard uses this "Name1" column name. Now when the query is
used as sub query, the names are kept non-unique, so the reference to "Name1" in
the wizard-generated query is bogus.
Comment 1 Frank Schönheit 2006-07-04 14:08:11 UTC
Comment 2 Frank Schönheit 2006-07-04 14:10:20 UTC
Created attachment 37495 [details]
document to reproduce the bug case
Comment 3 Frank Schönheit 2006-08-07 10:54:45 UTC
hard to fix, and IMO not important enough for 2.x - the valid and easy
workaround is to give an alias name to the second column when designing the query.
Comment 4 Marcus 2017-05-20 10:48:18 UTC
Reset assigne to the default "".