Issue Details (XML | Word | Printable)

Key: CORE-2871
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dmitry Yemanov
Reporter: Dmitry Yemanov
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Outer ORDER BY clause has no effect

Created: 16/Feb/10 02:28 PM   Updated: 26/Apr/13 11:24 AM
Component/s: Engine
Affects Version/s: 2.1.0, 2.5 Alpha 1, 2.1.1, 2.1.2, 2.5 Beta 1, 2.5 Beta 2, 2.1.3, 3.0 Initial, 2.5 RC1, 2.5 RC2
Fix Version/s: 2.0.6, 2.5 RC3, 2.1.4, 3.0 Alpha 1

Time Tracking:
Not Specified

Issue Links:
Relate
 

Planning Status: Unspecified


 Description  « Hide
If a derived table (or a view) contains both a left/right join and an ORDER BY clause and the outer query also contains an ORDER BY clause, the latter one gets ignored.

Test query against the EMPLOYEE sample database:

select *
from (
    select
        emp_no, first_name, last_name, country, currency
    from employee
        left join country on employee.job_country = country.country
    order by last_name
)
order by emp_no desc

The result is ordered by "last_name".


 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Pavel Cisar added a comment - 26/Apr/13 11:24 AM
Test added.