<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - FIREBIRD: Query with two fields with the same name couldn't be sorted"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=126178">126178</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>FIREBIRD: Query with two fields with the same name couldn't be sorted
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>6.3.0.0.beta2+
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Base
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>robert@familiegrosskopf.de
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="http://bugs.documentfoundation.org/attachment.cgi?id=152488" name="attach_152488" title="Open the queries - the one with an alias will work, the other not">attachment 152488</a> <a href="http://bugs.documentfoundation.org/attachment.cgi?id=152488&action=edit" title="Open the queries - the one with an alias will work, the other not">[details]</a></span>
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.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>